Skip to content

c2m2-asia/mongolia-health-portal-backend

Repository files navigation

Mongolia Health Portal
Accumulating health services data with OpenStreetMap

Maintained by Kathmandu Living Labs

C2M2-Mongolia - Backend

Backend repository for C2M2-Mongolia based on Node JS.

Development Setup

  • Clone the repository: git clone [email protected]:c2m2-mongolia/c2m2-api.git
  • Install required npm packages: npm i && npm i -g nodemon
  • Run the development server $ npm run start

To generate the API Documentations using APIDOC

  • npm run apidocs

Build and push docker image for c2m2-api

  • Login to the gitlab container registry with your gitlab credentials: docker login code.kathmandulivinglabs.org:5555
  • Build docker image: docker build -t code.kathmandulivinglabs.org:5555/c2m2-mongolia/c2m2-api/dev:${version_number.dd.mm.yyyy} .
  • Push docker image: docker push code.kathmandulivinglabs.org:5555/c2m2-mongolia/c2m2-api/dev:${version_number.dd.mm.yyyy}

Run API server using docker image

  • Copy the latest docker image from container registry and paste it in the docker-compose.yml file
  • Create a .env file to store environment variables:
####
# For API and postgres DB
####
API_BASE_URL=http://localhost:8080
POSTGRES_HOST= {db_container_name}
POSTGRES_DBNAME= {db_name}
POSTGRES_PORT={db_port}
POSTGRES_USER= {db_user}
POSTGRES_PASSWORD={db_password}
DATABASE_URL= postgres://{db_name}:{db_password}@{db_container_name}:{db_port}/{db_user}
POSTGRES_MULTIPLE_EXTENSIONS=postgis,postgis_topology

  • Run the server: docker-compose up

Open source configuration

Contributing

If you'd like to contribute, clone the repository and push your changes to data-portal-cityname branch. You may also fork the repository and contribute to this open source data portal API.

Links

  • API Documentation: Existing API doc link for Mongolia health portal.
  • Issue tracker: Link to issue board for mongolia health portal backend repository.

Partners

This project is a part of the C2M2 project with Kathmandu Living Labs and Public Lab Mongolia as project partners.

License

This project is licensed under the MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages