Golang Mongo Web Boilerplate
WORK IN PROGRESS
Installation
- makesure your mongodb are running in 127.0.0.1:27017 without password, if you don't have mongo, you can install it here
- or you can set it up here
- run this command
git clone https://github.com/codenoid/go-mongo-web-boilerplate.git
cd go-mongo-web-boilerplate
go build
./gmwb
// open localhost:6969
Usage
- access http://localhost:6969/setup to save user data (for test purpose)
- you will redirected to
/login
the username and password isadmin
- once success, you will redirected to
/
Project Structures
.
βββ controllers
βΒ Β βββ auth.go
βΒ Β βββ connector.go
βΒ Β βββ home.go
βββ go.mod
βββ helpers
βΒ Β βββ hash.go
βββ main.go
βββ routes.go
βββ structs
βββ user.go
Features & TODO
- Basic Project Structure
- Shared Single Mongo Connection
- Login/Logout page
- Redis use for session
- HTML Views