Home - usil/eventhos-api GitHub Wiki

eventhos-api

Eventhos api, which endpoints will be consumed by the eventhos UI. You can check them in the endpoints section.

What is eventhos?

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

Requirements

  • nodejs >= 16
  • mysql >= 5.5 (user with all privileges)

Database

Eventhos works with a mysql database using knex, you should pass your database information in the environment variables.

Security

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

Automated start

Just run docker-compose up -d

Manual start (developers)

npm install
npm run dev

By default the app runs in the 2109 port.

Manual start (production)

npm install
npm run build
npm run start

By default the app runs in the 2109 port.

General usage

Once the application is running you can either use the eventhos platform (recommended) or use the endpoints that this api has.

Environment variables

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

License

MIT

Contributors


Luis Huertas

JRichardsz
```
⚠️ **GitHub.com Fallback** ⚠️