- web: Node.js
- db: PostgreSQL
- Fill in docker-compose: Insert proper values to predefined docker-composer.yml file in those places
POSTGRES_USER: [username]
POSTGRES_PASSWORD: [password]
POSTGRES_DB: [db_name]
- Fill in environment variables: Fill in predefined prod.env file, make sure that db variables (as password, username and so on) are exact the same like those that you provide to PostgreSQL config.
- Install rimraf: Run
npm i rimraf
to install rimraf package. - Initialize build directory: Run
npm run build
on project root directory to initialize .js files. - Build and Run the Docker Containers: Execute the
docker-compose up
command in your terminal to build and run the project. Ensure Docker is installed on your device before running the command.
- Generate First Token: Use /api/v1/generatetoken endpoint to generate token, it requires API Key to work.
- Use Endpoints: Now, when you have token, you can access to every API endpoint you want, just provide it as Bearer token. The list of endpoint:
- /api/v1/connector - for Connectors table
- /api/v1/cs - for ChargingStations table
- /api/v1/cstype - for ChargingStationTypes table
- Refresh Token: Every token expires after 120s so if it will happen, you need to use that token on /api/v1/refreshtoken endpoint to regenerate a new one. After that, old token cannot be use anymore to authenticate (if it was still nonexpired) or to regenerate new one
Visit /api-docs for the Swagger documentation.