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.jsonorconfig.prod.jsoninside config folder, by adding your mongodb url to url field. env=dev go run app.goorenv=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.