If you dont have install node-js, please go this link https://nodejs.org
Let's begin by installing Sequelize CLI package. npm install -g sequelize-cli
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
Update and Install RabbitMQ, please go this link install-and-use-rabbitMQ
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"
},
}
- Use command
npm install
for install dependices - 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
- Now try running the migrate
npm run migrate
- Now try running the seed users
npm run generate-users
- Now try running the application server
npm start
and visiting http://localhost:8080.
Have fun! smile