title | keywords | description | |||
---|---|---|---|---|---|
Todo App + Auth + GORM |
|
A Todo application with authentication using GORM. |
This project demonstrates a Todo application with authentication using GORM.
Ensure you have the following installed and available in your GOPATH
:
-
Clone the repository:
git clone https://github.com/gofiber/recipes.git cd recipes/todo-app-with-auth-gorm
-
Install dependencies:
go get
- Start the application:
air
Create a .env
file in the root directory and add the following variables:
# PORT returns the server listening port
# default: 5000
PORT=
# DB returns the name of the sqlite database
# default: gotodo.db
DB=
# TOKENKEY returns the jwt token secret
TOKENKEY=
# TOKENEXP returns the jwt token expiration duration.
# Should be time.ParseDuration string. Source: https://golang.org/pkg/time/#ParseDuration
# default: 10h
TOKENEXP=