Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
/ AeolusAPI Public archive

API to model electricity prices and consumption based on simulated weather conditions.

Notifications You must be signed in to change notification settings

Aeolus-Framework/AeolusAPI

Repository files navigation

AeolusAPI

Build Status

An RESTful API modeling electricity price, production, and consumption based on wind speed

Usage

First, install all dependencies with

npm install

or

npm ci

then you will be able to proceed with one of the npm script in NPM scripts section below.

NPM scripts

Command Use case
npm run build Build the project
npm run build && npm start Build and run the project
npm test Run unit tests
npm run dev Rebuild and restart the application when a file in the project is changed
npm run docgen Build the project and generate openapi (swagger) documentation

Authorization

In order to access the API, you will need to have a valid JWT token in the authorization header.

Enviroment variables avaliable

Name Description Default
MONGODB_HOST Host with a mongo instance running, may include port number
MONGODB_DATABASE Database to use
MONGODB_USERNAME (optional) Username to access database None
MONGODB_PASSWORD (optional) Password to access database None
JWT_ISSUER (optional) Issuer to use when creating and verifying JWTs "none"
JWT_SECRET (optional) Secret to use when creating and verifying JWTs "123"
SWAGGER_FILE (optional) File to open-api swagger doc "./openapi_doc.json"
SIMULATOR_API_HOST (optional) Hostname used to access simulator API "localhost"
SIMULATOR_API_PORT (optional) Port used to access simulator API 5500

Build and run with docker

Build docker image.

docker build . -t aeolus/api

Run a docker container with the newly built image and link the external port 5700 to container port 8080.

docker run -d -p 5700:8080 aeolus/api

To add enviroment variables, add --env VARIABLE=VALUE for each enviroment variable to use.

About

API to model electricity prices and consumption based on simulated weather conditions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published