This is a base go lang API with CURD operations with MongoDB
- Layered folder structure
- Different Packages
This API uses a number of open source projects to work properly:
- [Golang] - evented operations for the backend
- [Iris-go] - fast Golang network app framework [iris-go.com]
- [mongo-go] - mongoDB official drivers for Golang
Article link: https://medium.com/@mirzafaizanejaz/go-lang-mongodb-iris-api-part-1-85024eb2d94d.
This API requires Golang v1.11+ to run.
Install the dependencies and devDependencies and start the server.
$ cd gom-api
$ go get -u
$ go app.go
Want to contribute? Great!
This API uses Rizla for fast developing. Make a change in your file and instantaneously see your updates!
Open your favorite Terminal and run these commands.
cd gom-api
go build app.go
This will create the executeable GO file and pull in the necessary dependencies.
I am using Rizla Hot Reloading package (which hot reloads the server on code changes) map the port to whatever you wish on your host or set a PORT on your .env file.
rizla app.go
Verify the deployment by navigating to your server address in your preferred browser.
127.0.0.1:8080
- Write Tests
- Add Bcrypt
- Add JWT
- Add Oauth
I am available on the following platforms if you have a question just reach out to me.
Network | link |
---|---|
MirzaFaizanEjaz | |
le_programmer | |
Medium | @mirzafaizanejaz |
Stack Overflow | faizan-ejaz |
MIT