Microservice for tenants and leases in ONECore.
- Make a copy of .env.template, call it .env
- Fill out values in .env. (see below)
- Install nvm
- Install required version of node:
nvm install
- Use required version of node
nvm use
- Install packages:
npm run install
- Start database engine (SQL Server):
docker compose up -d &
- Create a database called
tenants-leases
- Create database structure:
npm run migrate:up
- Create test data:
npm run seed
Start the development server: npm run dev
The test suite requires a dedicated database for our database unit tests to run.
For local development, create a new MSSQL database and make a copy of .env.test.template
called .env.test
and supply
the credentials to your test database.
According to .env.template.
We utilize koa2-swagger-ui
and swagger-jsdoc
for documenting our API. Each endpoint is required to have appropriate
JSDoc comments and tags for comprehensive documentation. The Swagger document is exposed on /swagger
.