RESTful API server for the Vendo Application
- Node (v15.0.1)
- Docker
- Clone the respository
- Install dependencies using
npm install
- Create a
.env
file based on the example.example.env
file:
$ cp .example.env .env
Generated using hapi-swagger and can be accessed on /documentation
$ docker build . -t vendo-api:latest
$ docker run -p 8080:8000 --env DATABASE_URL=[[POSTGRESQL_DB_URI_STRING]] -d vendo-api:latest
- Start the development PostgreSQL instance on docker
$ docker-compose -f docker-compose.dev-pg.yml up -d
2, Start the development mode:
$ npm run dev
- Spin up a test DB container
$ docker compose -f docker-compose.test-pg.yml up -d
- Create the DB:
$ npx dotenv -e .env.test -- prisma migrate dev --name init
- Start the test
$ npm run test