Skip to content

Latest commit

 

History

History
66 lines (49 loc) · 1.47 KB

databases.md

File metadata and controls

66 lines (49 loc) · 1.47 KB

##Setting Up MongoDB Follow the steps here

Setup your mongoDB directory

Note: Make sure you have the directory and its permissions setup (i.e. /data/db):

sudo mkdir -p /data/db
sudo chown -R `id -u` /data/db

Run your mongoDB server

mongod

After installation, you have to set MongoDB DB configuration at .env

MONGODB_URI=mongodb://YOUR_ID:YOUR_PASSWORD@localhost:port/DB_NAME;

##Setting Up MySQL

Follow the steps here

After installation, you have to set MySQL DB configuration at .env

MYSQLUSER=YOUR_ID
MYSQLPASS=YOUR_PASSWORD

##Setting up Postgres

Follow the steps here

Run your Postgres server

postgres -D /usr/local/var/postgres

Setup your postgres database

createuser root
createdb react_webpack_node_development # or test/production
npm run sequelize db:migrate

After installation, you have to set Postgre DB configuration at .env

PGUSER=YOUR_ID
PGPASS=YOUR_PASSWORD

Installing on Heroku

# https://devcenter.heroku.com/articles/heroku-postgresql#provisioning-the-add-on
heroku addons:create heroku-postgresql:<PLANNAME> --as POSTGRES_DB
heroku run bash
# once in bash
npm run sequelize db:migrate
# exit heroku bash