Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madhums/go-gin-mgo-demo
A demo CRUD application in golang using the popular gin-gonic framework
https://github.com/madhums/go-gin-mgo-demo
demo-crud-application gin golang mongodb
Last synced: about 1 month ago
JSON representation
A demo CRUD application in golang using the popular gin-gonic framework
- Host: GitHub
- URL: https://github.com/madhums/go-gin-mgo-demo
- Owner: madhums
- License: mit
- Created: 2015-08-08T00:48:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-06-18T21:10:29.000Z (over 1 year ago)
- Last Synced: 2024-11-09T23:12:16.466Z (about 1 month ago)
- Topics: demo-crud-application, gin, golang, mongodb
- Language: Go
- Homepage: http://go-gin-mgo-demo.herokuapp.com
- Size: 339 KB
- Stars: 161
- Watchers: 13
- Forks: 37
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
## go-gin-mgo-demo
A demo CRUD application in golang using the popular gin-gonic framework
## Development
1. Clone the (forked) repo.
2. Then, run```sh
$ go get github.com/codegangsta/gin
```[codegangsta/gin](http://github.com/codegangsta/gin) is used to to automatically compile files while you are developing
3. Run
```sh
$ go get && go install && PORT=7000 DEBUG=* gin -p 9000 -a 7000 -i run # or run make dev
```Then visit `localhost:7000`
4. `MONGODB_URL` and `PORT` can be configured by setting the env variable.
```sh
$ export MONGODB_URL=mongodb://
$ export PORT=7000
```
5. [godep](https://github.com/tools/godep) is used for dependency management. So if you add or remove deps, make sure you run `godep save` before pushing code. Refer to its documentation for more info on how to use it.## Usage
```sh
$ go get github.com/madhums/go-gin-mgo-demo
$ PORT=7000 GIN_MODE=release go-gin-mgo-demo # should start listening on port 7000
```#### Credits
Thanks to all the dependent packages