/alun-api

Primary LanguageGoMIT LicenseMIT

CircleCI Go Report Card Docker Badge

Al-un API

API for al-un.fr

Docker

Images are available on Docker hub.

Monolithic build

sudo docker-compose --file api-monolith-compose.yml build --no-cache
sudo docker-compose --file api-monolith-compose.yml up

Endpoints are all in https://localhost:8000

Microservices build

sudo docker-compose --file api-microservice-compose.yml build --no-cache
sudo docker-compose --file api-microservice-compose.yml up

Endpoints are:

  • user app: http://localhost:8001
  • memo app: http://localhost:8002

Resources

MongoDB

Queries

db.al_users_login.deleteMany({ "timestamp": {"$lte": new Date() } )
db.al_users_login.deleteMany( { "timestamp": { "$lte": new Date(2999,1,1) } } )

https://stackoverflow.com/a/30772989/4906586 https://stackoverflow.com/a/47170066/4906586

Heroku

heroku accounts:set al-un

heroku apps:create --region=eu --buildpack=heroku/go alun-api
heroku addons:create mongolab:sandbox --app alun-api

Notes

Testing:

CircleCI

MongoDB: lookup