Bull API
To get started with Bull, you need to have any Linux distributions, Node.js and npm (Node Package Manager) installed on your machine.
- Clone the repository:
git clone https://github.com/ArgoN1ck/bull.git
- Navigate to the project directory:
cd bull
- Install the dependencies:
npm install
- Navigate to the devops directory
cd devops
- Install the dependencies:
npm install
Before running the application, you need to set up the environment variables in .env file (devops/.env) :
NODE_ENV=development
HOST=0.0.0.0
PORT=3333
PSQL_HOST=localhost
PSQL_USERNAME=postgres
PSQL_PASSWORD=root
PSQL_DATABASE=postgres
REDIS_HOST=bull-redis
REDIS_PORT=6379
To run the application, you need to navigate to devops directory.There are several options:
To start the app in development mode with hot-reloads enabled:
npm run docker:dev:up
To build and run the app in production mode:
npm run docker:prod:up
Bull uses TypeORM and FlywayDB to run migrations. You can use the following commands to manage your database migrations:
npm run migration:run
To run the tests navigate to devops folder, run dev or prod infrastructure and execute command:
npm run test