Coder Social home page Coder Social logo

react-saga-auth's Introduction

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

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 9.6:

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
   

If service is not started, you can start the PostgreSQL service.

sudo service postgresql start

Connect PostgreSQL server using postgres user:

ubuntu@:~$ su postgres
Password:****

Create a sample database:

createdb database_name

Connect to that database:

psql -d database_name

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. Now try running the migrate npm run migrate
  3. Now try running the application server npm run server and visiting http://localhost:8000.
  4. Running the client to do this, we run the following command: npm run client

Have fun! smile

react-saga-auth's People

Contributors

mihalskiy avatar

Watchers

James Cloos avatar nazar-kushniruk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.