This is a branch project of the notes app back end intended for consuming export notes queue from back-end with RabbitMQ.
- Node.js v16.13+
- NPM v8.1+
- PostgreSQL v13.3+
- RabbitMQ v3.9+
- Clone this repository:
git clone https://github.com/alvinmdj/notes-app-queue-consumer.git
- Go to the root directory:
cd notes-app-queue-consumer
- Install dependencies:
npm install
- Copy
.env.example
and paste as.env
:
cp .env.example .env
- Setup environment variables in
.env
:
# node-postgres configs
PGUSER=<username>
PGPASSWORD=<password>
PGDATABASE=<dbname>
PGHOST=localhost
PGPORT=5432
# nodemailer SMTP authentication (using gmail)
MAIL_HOST=smtp.gmail.com
MAIL_PORT=465
MAIL_ADDRESS=<email-address>
MAIL_PASSWORD=<email-password>
# message broker
RABBITMQ_SERVER=amqp://localhost
- Run:
npm run start
- Lint:
npm run lint