Skip to content

Latest commit

 

History

History
51 lines (35 loc) · 1.17 KB

postgres_setup.md

File metadata and controls

51 lines (35 loc) · 1.17 KB

Setup with postgres database

Run using postgres database.

To run the project on posgres database you need to install postgresql 10+ in your system

Linux setup:

  1. Install postgres:
sudo apt-get install postgresql postgresql-contrib
  1. Now create a superuser for PostgreSQL
sudo -u postgres createuser --superuser name_of_user
  1. And create a database using created user account
sudo -u name_of_user createdb name_of_database
  1. You can access created database with created user by,
psql -U name_of_user -d name_of_database
  1. Your postgres database url wil be something like
postgresql://localhost/name_of_database

Or, if you have setup password then,

postgresql://username:password@localhost/name_of_database
  1. Now take this url and go back to [this section in Main Readme file](../README.md#setting up-the-postgres-databse)
#### Windows setup: <a id='windows_pg'></a>
Download and install [official site](https://www.postgresql.org/download/windows/)

1. Create a postgreql database and obtain its local url