- Clone the repo:
git clone https://github.com/joelewis/gorilla-seed
- Update the config variables in
main.go
(DB_URL, SERVER_PORT, etc.) - Rename the directory's name to your app's name.
mv /path/to/gorilla-seed /path/to/my-app-name
- Update import paths.
Eg.
import "path/to/gorilla-seed/models"
toimport "path/to/my-app-name/models"
- Compile:
go build
- Initialize tables:
./my-app-name inittables
- Run server :
./my-app-name
Nothing much.
- A developer friendly ORM - gorm
- A
user
model with a basic setup of gorilla/sessions for authentication. There is no pages or handlers for user signups or login/logout. It is left for you to implement.
- Define the route in
routes.go
- Add corresponding handler in
controllers/controllers.go
- Add the model structs in
models/models.go