Skip to content

Some convenience functions around building Go web applications

License

Notifications You must be signed in to change notification settings

sfreiberg/webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webapp

GoDoc

Warning

This repository is experimental and opinionated. You should not rely on it for production unless you are prepared to keep up with breaking changes.

About

There is a lot of common code that goes with building web applications in Go. While this is fine when that is your primary job it can make building hobby sites or just experimenting much slower and more tedious. Webapp attempts to improve that situation but this is an experiment. Also, the code will be opinionated and my opinions may not match yours.

Example

package main

import (
	"log"

	"github.com/gofiber/fiber/v2"
	"github.com/sfreiberg/webapp"
)

func main() {
	app := webapp.New()

	app.Get("/", func(c *fiber.Ctx) error {
		return c.SendString("Hello, World 👋!")
	})

	if err := app.Run(); err != nil {
		log.Fatalf("Error starting web app: %s\n", err)
	}
}

Usage

NAME:
   your-app - Built with github.com/sfreiberg/webapp

USAGE:
   your-app [global options] command [command options] [arguments...]

COMMANDS:
   generate, g  Generators
   routes       Display routes
   server, s    Start web server
   tasks, t     Display tasks
   help, h      Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h  show help (default: false)

About

Some convenience functions around building Go web applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages