Skip to content

mihalskiy/node-notification-scheduler-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo houses code for Send users to message (using Sequelize, rabbitMQ, and PostgreSQL)"

If you dont have install node-js, please go this link https://nodejs.org

Sequelize Setup

Let's begin by installing Sequelize CLI package. npm install -g sequelize-cli

PostgreSQL Setup for LINUX

You need to add the latest PostgreSQL repository for the latest version.

sudo add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"

Update and Install PostgreSQL on ubuntu 18.04, please go this link install-and-use-postgresql

Downloading and Installing RabbitMQ

Update and Install RabbitMQ, please go this link install-and-use-rabbitMQ

Config Setup

go to directory /you_project/server/config and open file config.json and change settings under your database

{
  "development": {
    "username": "you_DATABASE_username",
    "password": "you_DATABASE_password",
    "database": "you_DATABASE_name",
    "host": "127.0.0.1",
    "port": 5432,
    "dialect": "postgres"
  },
}

Project Setup

  1. Use command npm install for install dependices
  2. create in core project file .env
EXAMPLE .env file
USERS=10000 // this is example of how many you need to generate users
HTTP_PORT=8080 //this is an example for a run your project on port 

//To make things a little easier, an object literal 
//syntax is also supported, like in this example which 
//will log a message every Sunday at 10:53pm:
HOUR=10 //(0-23)
MINUTE=53 //(0-59)
DAY_OF_WEEK=0 //(0-6) Starting with Sunday
  1. Now try running the migrate npm run migrate
  2. Now try running the seed users npm run generate-users
  3. Now try running the application server npm start and visiting http://localhost:8080.

Have fun! smile

Releases

No releases published

Packages

No packages published