Sample project using Echo.
fasthttp
enabled by default- OAuth2 with Google & Dropbox
- JWT for user authentication
This lib requires:
- Golang v1.6
- sqlite3 v3.8.10.2
$ go get
Create database file using sqlite3 (you must have sqlite3 installed)
$ sqlite3 gekko.db
.databases
and then create the user
table:
CREATE TABLE "user" (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`id_provider` TEXT NOT NULL,
`display_name` TEXT NOT NULL,
`email` TEXT NOT NULL,
`profile_picture` TEXT NOT NULL,
`role` INTEGER NOT NULL DEFAULT 1,
`token` TEXT,
`jwt` TEXT
);
Create your config file within config
directory. Its name must match with the pattern [env].conf
.
Recommended envs: dev
, test
.
Use env.conf.sample
as base since it has the expected format. Just replace the values!
$ export GEKKO_ENV=test && go test
$ export GEKKO_ENV=[env] && go run main.go