Data service web server for Global Electrification Platform.
To set up a development environment install the following on your system:
Clone this repository locally and activate target Node.js version:
nvm install
Install Node.js dependencies:
npm install
Start development database:
npm run start-dev-db
Open a new terminal and seed the database:
npm run prepare-dev-db
Start development server with changes monitoring:
npm run dev
Access the service at localhost:3000
After developing, stop Docker database container by pressing Control-C.
Start test database:
npm run start-test-db
Open a new terminal and run tests:
npm run test
After testing, stop Docker database container by pressing Control-C.
Use these to setup a custom environment:
Name | Description | Default |
---|---|---|
PG_CONNECTION_STRING |
PostgreSQL connection string | none |
REDIS_HOST |
Redis host | 127.0.0.1 |
REDIS_HOST |
Redis port | 6379 |
REDIS_TTL |
Redis "time-to-live" or cache duration | 1 week |
Please refer to the docs website for more information about this data service and other components of GEP:
https://global-electrification-platform.github.io/docs/