Skip to content

Instantly share code, notes, and snippets.

@jugshaurya
Last active May 4, 2021 07:12
Show Gist options
  • Save jugshaurya/301fafc68fdc7db9e82e5785ab5cdb26 to your computer and use it in GitHub Desktop.
Save jugshaurya/301fafc68fdc7db9e82e5785ab5cdb26 to your computer and use it in GitHub Desktop.
gondor openSource Helper
**Install Postgres**
$sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install postgresql postgresql-contrib libpq-dev pgadmin3
$ sudo su - postgres
$ psql
postgres-# \l
**Create Database**
create database gondor;
===
this created a db named gondor registered to user postgres
then
\password postgres - entered password postgres only
**Update Env Vars**
```bash
touch .env
#.env
DB_HOST=127.0.0.1 #optional
DB_USERNAME=postgres #or any other postgres username
DB_NAME=gondor #optional
DB_PASSWORD= #postgres user password if any
```
**Run Migrations**
```bash
yarn sequelize db:migrate
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment