Skip to content

esaude/esaude-admin-api

Repository files navigation




OpenMRS


eSaude Admin API

Build Status codecov Codacy Badge eSaude Docs eSaude Slack

The eSaude admin API is an Express application that is built using swagger-node.

Install

To install the eSaude admin app, first install the prerequisites (Docker & Compose), then follow the eSaude Admin install instructions:

$ wget https://get.esaude.org/app/esaude-app-admin.yml
$ docker-compose -p esaude -f esaude-app-admin.yml up -d

📌 You will need need v1.2.30+ of the eSaude Platform running to use the admin app.

Development

First make sure you have a recent version of Node.js installed (tested with v7.5.0). Then, install swagger globally:

npm install -g swagger

Install the project dependencies:

npm install

Run

To launch the API using Swagger, run:

swagger project start

When launched this way, the API is not running inside Docker, so we don't have access to the platform containers. It's more useful to run a container that runs the code in your working directory:

docker-compose -p esaude -f docker-compose-api-dev.yml up

To launch the Swagger editor, in a separate terminal, run:

swagger project edit

Contribute

Read the Express and swagger-node documentation and make your edits to the Swagger spec and/or Express controllers.

The API will watch the file system and automatically restart when changes to the Swagger spec or Express controllers are made.

Build

Docker

To build a Docker image, first create a production build (see above), then run:

docker build -t esaude-admin-api:dev .

Test

To test the API, run:

npm test

License

MPL 2.0 w/ HD

About

The eSaude admin application programming interface.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published