rest-api

command module
v0.0.0-...-d7671c7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

README

Hackaton 4.0 API REST

Execution

.env for sqlite

# sqlite live
DB_DRIVER=sqlite3
API_SECRET=98hbun98h #Used for creating a JWT. Can be anything 
DB_NAME=fullstack.sqlite
# email sender
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
EMAIL_FROM=example@gmail.com
EMAIL_PASS=password
# frontend info
FRONTEND_BASEURL=https://ranking.example.com
FRONTEND_LOGIN_PATH=/login?token=

then run:

go mod tidy
go run main.go

Go-JWT-Postgres-Mysql-Restful-API

This is an application built with golang, jwt, gorm, postgresql, mysql.

You can follow the guide here: https://levelup.gitconnected.com/crud-restful-api-with-go-gorm-jwt-postgres-mysql-and-testing-460a85ab7121

Dockerizing the API

The dockerized API can be found here: https://github.com/victorsteven/Dockerized-Golang-Postgres-Mysql-API

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
File to try some tie cases to sort election candidates based on result clear && go run test.go | jq
File to try some tie cases to sort election candidates based on result clear && go run test.go | jq

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL