- Node.js (Minimum version 12.14.1)
- TypeScript (Minimum version 4.2.4)
- Sequelize - as a default module for SQL databases if you are fine with default version
- MySQL - (MySQL Community Server 8.0.25) or PostgreSQL - (Minimum Version 12.x)
- Optional: If you want to use FHIR service, user the one using version R4. Default is GCP FHIR for which you have enable the GCP API for FHIR and set the creds.
- Visual Studio Code with following extensions
- ESLint by Dirk Baeumer
- DotENV by mikestead
- Prettier Code Formatter by Prettier
- MySQL Workbench
- Postman
-
Clone this repository
clone git@github.com:REAN-Foundation/reancare-service.git <your-local-folder>
-
Install all the prerequisites as listed in technology stack.
-
Open the root directory of the folder where you have cloned/forked the repository in Visual Studio Code.
-
Go to terminal of VSCode and type
npm install
. This will install all the dependency packages. -
Open /.env.sample file and change the name to .env. Update the environment variables in .env file to the ones which are available on your machine.
-
Debug mode:
- Make sure you have /.vscode/launch.json file available.
- Click on debug button on left panel and you should see 'Launch Program' option against 'RUN AND DEBUG' label.
- Click on 'Play' button against 'Launch Program' to start the service in debug mode.
-
Normal mode:
- To start service in regular mode, go to the terminal and run
npm start
.
- To start service in regular mode, go to the terminal and run
-
You should be able to see server start messages.
-
Congratulations, your local REANCare service is up and running!
There is a comprehensive set of postman requests in the collection 'reancare.default.postman_collection.json' located inside folder '<your-root-folder>/postman/'.
Steps to run the default postman collection requests
- Import the postman collection JSON file.
- Import the environment by importing environment JSON file, - 'reancare.default.local.postman_environment.json'.
- Select the imported environment in Postman.
- When you are starting, it is advisable to execute the requests in sequential order from top-to-bottom.
Please refer our Coding Style and Guidelines.
Want to add a new feature/API/Model CRUD API? please refer Checklist to add new API or model.