Patient Profile Management is the api to keep the record of the patient record.
$ git clone https://github.com/bibekthapa007/patient-profile-management.git
$ yarn
2. Copy .env.example
as .env
file inside your root directory. Update the environment variables based on stage.
$ cp .env.example .env
$ yarn migrate
$ yarn seed
Start the development server.
$ yarn start:dev
When you make unit of changes such as Creating API for updating status
. Here are the steps someone must adhere to before commiting changes:
$ yarn lint
$ yarn prettier
$ git commit -m "Commit" #duration <DURATION> <YOUR_COMMIT_MESSAGE>"
There are multiple build targets available for different stages. These images can be used to deploy or run jobs in different container based cloud infrastructure like Kubernetes, AWS ECS, Fargate, GCP Cloud Run etc.
-
Building a production image.
$ docker build --target=prod -t app:prod .
-
Building an image for development.
$ docker build --target=dev -t app:dev .
-
Building an image that runs migration and/or rollback.
# Docker image that runs migration and seeds. $ docker build --target=migrate -t app:migrate . # Docker image that rollbacks migrations. $ docker build --target=migrate-rollback -t app:migrate-rollback .
Once the images have been built - all you need to do is run them providing a .env
file. Like this:
$ docker run -v "/path/to/your/.env:/app/.env" app:migrate
To run the tests you need to create a separate test database. Don't forget to update your .env
file to include the connections for test database.
$ NODE_ENV=test yarn migrate
$ yarn test
Run tests with coverage.
$ yarn test:coverage