This project uses environ to handle the environment variables. While developing, you should add profiles.clj
file to the root of this project with the following contents:
{:dev {:env {:db-name "budget"
:db-user "user"
:db-pass "pass"
:db-type "postgresql"
:host "localhost"
:port 5432}}}
This way your environment is set while developing with REPL.
Database schema is managed by flyway and the underlaying database is Postgresql.
For the first run you can use the official postgres docker image to set up the database.
docker run --name budget-postgres -e POSTGRES_PASSWORD=pass -d -p 5432:5432 postgres
docker run -it --rm --link budget-postgres:postgres postgres psql -h postgres -U postgres budget
curl -H "Content-Type: application/json" -X POST -d '{"lol": "bal"}' http://localhost:5000/purchase