This repo houses code for auth by token and crud on react redux-saga (using Sequelize and PostgreSQL)"
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"
sudo apt-get update
sudo apt-get install postgresql-9.6
Default postgres super user and postgres database is created. You need to set a password for the postgres super user.
ubuntu@:~$ sudo passwd postgres
Enter new UNIX password:****
Retype new UNIX password:****
passwd: password updated successfully
sudo service postgresql start
ubuntu@:~$ su postgres
Password:****
createdb database_name
psql -d database_name
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 - Now try running the migrate
npm run migrate
- Now try running the application server
npm run server
and visiting http://localhost:8000. - Running the client to do this, we run the following command:
npm run client
Have fun! smile