This repository holds the codebase and tools (like a simple web-frontend to visualize latest records) for the chargEV DB. This database has a public (Server-to-Server) API which is implemented using this codebase.
See the documentation the docs folder for technical details of the API and the current API specification.
Start the MongoDB in Docker:
npm install
docker-compose up -d db
export MONGODB_URI=mongodb://$(docker-machine ip default)/chargevdb
Create a .env
file for development:
API_JWT_SECRET=secret
npm run tsc ; npm start
This App is currently deployed on Heroku:
https://dashboard.heroku.com/apps/chargev-db
For production set the same env vars listen in the .env
file using e.g. heroku config:add
.
Get the current connect Link from mLab (see "installed add-ons" in the Overview section).
The current mongoDB User and Pass are stored in the MONGODB_URI
config var (See "Settings" section), als the full
URI can be used.
docker-compose exec db mongoexport --quiet --uri $(heroku config:get MONGODB_URI) -c chargeevents > chargeevents.jsonl
docker-compose exec -T db mongoimport -d chargevdb --drop -c chargeevents < chargeevents.jsonl
See the LICENSE file.
Remus Lazar [email protected]