This is a simple golang webapp
- git clone :
git@github.com:rohit-raj/basic-go-webapp.git
go get package_path
- make changes to
config.dev.json
orconfig.prod.json
inside config folder, by adding your mongodb url to url field. env=dev go run app.go
orenv=prod go run app.go
Note: just make the changes in config json files
file and make sure that the database exists.
You need not have to create the collection. When the server starts, it will automatically create the necessary collection and initialize them.
Feel free to post questions and star.