-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Eventhos api, which endpoints will be consumed by the eventhos UI. You can check them in the endpoints section.
Eventhos is an open source platform that some principles of Event Driven Architectures to improve the integration or choreography between company systems.
Here a minimalist High Level Diagram
To take a deep look into how eventhos works check the documentation.
In this repository you will find the code of the artifact called eventhos-api
- nodejs >= 16
- mysql >= 5.5 (user with all privileges)
Eventhos works with a mysql database using knex, you should pass your database information in the environment variables.
Authentication and authorization are based on a custom oauth2 implementation oauth2-starter library.
This library will create a credentials.txt
file with the admin credentiaLS in the /tmp folder.
📢 Change after the first login
Just run docker-compose up -d
npm install
npm run dev
By default the app runs in the 2109 port.
npm install
npm run build
npm run start
By default the app runs in the 2109 port.
Once the application is running you can either use the eventhos platform (recommended) or use the endpoints that this api has.
Following the third commandment we use environment variables to handle the configurations
Variable | Description | Default Value |
---|---|---|
DATA_BASE_NAME | The eventhos platform database name | eventhos |
DATA_BASE_HOST | The eventhos platform database host | localhost |
DATA_BASE_PORT | The eventhos platform database port | 3306 |
DATA_BASE_USER | The eventhos platform database user | usr_eventhos |
DATA_BASE_PASSWORD | The eventhos platform database password | abcdefg |
CPU_COUNT | How many cpu cores use | 1 |
PORT | The application port | 2109 |
JWT_SECRET | The secret for the JWT creation | secret |
CRYPTO_KEY | The secret key to encrypt | secret_key |
DATA_BASE_ACQUIRE_CONNECTION_TIMEOUT | The timeout to acquire a connection using knex | 10000 |
DATA_BASE_POOL_MIN | The minimum knex connection pool | 100 |
DATA_BASE_POOL_MAX | The maximum knex connection pool | 300 |
SMTP_HOST | Sender identifier | |
SMTP_PORT | Communication endpoint that defines the routing of email transactions | |
SMTP_USER | User of your mail server | |
SMTP_PASSWORD | Password of your mail server | |
SMTP_SECURE | Encrypt | true |
SMTP_TLS_CIPHERS | Are algorithms that help secure network connections that use Transport Layer Security | SSLv3 |
SMTP_DEFAULT_RECIPIENT | Default recipients if there aren't recipients in a contract or if there are error before event's send | |
LOG_FILE_PATH | Use a file for the logs | false |
LOG_LEVEL | Set the logger level | debug |
Luis Huertas |
JRichardsz |
- Get token with client credential grant
- More oauth2 enpoints here
- get all events
- GET /event
- create events
- POST /event
- update events
- PUT /event
- delete event
- DELETE /event
- get all received events
- get details of received event
- GET /event/received/:id
- get details of executed contracts
- GET /received/execution-detail/:id
- create system