command
module
Version:
v1.1.0-beta
Opens a new window with list of versions in this module.
Published: Oct 17, 2021
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Moon Boilerplate
Moon Boilerplate has been developed to make powerful and fast web applications.
⚡️ Quickstart
go get -u github.com/ferdiunal/moon
cd $GOPATH/src/github.com/ferdiunal/moon
cp .env.example .env
nano .env
APP_NAME="Moon Boilerplate"
APP_PORT=3000
APP_KEY=
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=moon
DB_USERNAME=root
DB_PASSWORD=
HASH_ID_KEY=
HASH_ID_LENGTH=8
package main
import (
"github.com/ferdiunal/moon/src"
"github.com/ferdiunal/moon/src/controllers"
"github.com/ferdiunal/moon/src/middlewares"
"github.com/ferdiunal/moon/src/models"
)
func Routes(router *src.Server) *src.Server {
router.Route("POST", "/auth/login", controllers.NewLoginController)
router.Route("POST", "/auth/register", controllers.NewRegisterController)
router.Route("GET", "/", controllers.NewIndexController, middlewares.NewTokenVerify)
return router
}
func main() {
app := src.NewApplication()
app.AutoMigrate(
&models.User{},
&models.PersonalAccessToken{},
)
server := src.NewServer(app)
Routes(
server.Init(),
).Run()
}
🥇 Feature
- Mars (Authentication provider inspired by Laravel Sanctum.)
- Venus
🔬Third-Party Libraries
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.