Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 2.8 KB

development.md

File metadata and controls

54 lines (41 loc) · 2.8 KB

How to setup development environment

Technology stack

  1. Node.js (Minimum version 12.14.1)
  2. TypeScript (Minimum version 4.2.4)
  3. Sequelize - as a default module for SQL databases if you are fine with default version
  4. MySQL - (MySQL Community Server 8.0.25) or PostgreSQL - (Minimum Version 12.x)
  5. 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.

Recommended Tools on Development Machine

  1. Visual Studio Code with following extensions
    • ESLint by Dirk Baeumer
    • DotENV by mikestead
    • Prettier Code Formatter by Prettier
  2. MySQL Workbench
  3. Postman

Development machine set-up

  • Clone this repository

    clone git@github.com:REAN-Foundation/reancare-service.git <your-local-folder>

    or fork the repository

  • 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.
  • You should be able to see server start messages.

  • Congratulations, your local REANCare service is up and running!

Testing the service with Postman

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

  1. Import the postman collection JSON file.
  2. Import the environment by importing environment JSON file, - 'reancare.default.local.postman_environment.json'.
  3. Select the imported environment in Postman.
  4. 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.