Rest API with Golang, MongoDB
- CRUD API
- Authentication
- Authorization
- Branch
master
for role authorization - Branch
rbac
for dynamic role base access control authorization
- Branch
- CORS
- Auto generate Swagger Docs with annotations
-
Create file .env
-
Set MongoDB URI and DB
- PORT = "8585" or your port
- MONGO_HOST = "your host/ localhost:27017"
- MONGO_DB_NAME = "your db name"
-
If you want to use real-time firebase's database. Replace with your serviceAccountKey.json. Then, add these variable into .env
- FIREBASE_DATABASE = "your database url"
- FIREBASE_STORAGE = "your firebase storage"
go mod download
for download dependenciesgo run main.go
localhost:8585/swagger/index.html