Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codenoid/go-mongo-web-boilerplate
Go net/http & mgo Web Boilerplate
https://github.com/codenoid/go-mongo-web-boilerplate
boilerplate golang website
Last synced: about 1 month ago
JSON representation
Go net/http & mgo Web Boilerplate
- Host: GitHub
- URL: https://github.com/codenoid/go-mongo-web-boilerplate
- Owner: codenoid
- License: mit
- Created: 2020-03-01T11:04:24.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-01T13:09:44.000Z (almost 5 years ago)
- Last Synced: 2024-10-19T06:44:35.125Z (3 months ago)
- Topics: boilerplate, golang, website
- Language: Go
- Size: 6.84 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Golang Mongo Web Boilerplate
[![Go Report Card](https://goreportcard.com/badge/github.com/codenoid/go-mongo-web-boilerplate)](https://goreportcard.com/report/github.com/codenoid/go-mongo-web-boilerplate)WORK IN PROGRESS
## Installation
1. makesure your mongodb are running in 127.0.0.1:27017 without password, if you don't have mongo, you can install it [here](https://docs.mongodb.com/manual/administration/install-community/)
2. or you can set it up [here](https://github.com/codenoid/go-mongo-web-boilerplate/blob/644dc7a0b73e19ace25017495bc1293774155ef4/routes.go#L12)
3. run this command```bash
git clone https://github.com/codenoid/go-mongo-web-boilerplate.git
cd go-mongo-web-boilerplate
go build
./gmwb
// open localhost:6969
```## Usage
1. access [http://localhost:6969/setup](http://localhost:6969/setup) to save user data (for test purpose)
2. you will redirected to `/login` the username and password is `admin`
3. once success, you will redirected to `/`## Project Structures
```bash
.
├── controllers
│ ├── auth.go
│ ├── connector.go
│ └── home.go
├── go.mod
├── helpers
│ └── hash.go
├── main.go
├── routes.go
└── structs
└── user.go
```## Features & TODO
- [x] Basic Project Structure
- [x] Shared Single Mongo Connection
- [x] Login/Logout page
- [ ] Redis use for session
- [ ] HTML Views