Start by installing PostgreSQL from the official download page.
We’ll be using Knex to interact with our database. Knex is a SQL query builder that we can use with PostgreSQL to handle migrations, manage the schema, and query the database.
We need to create two new databases, one for developing and the other for testing. Open psql in the terminal, and create a new database:
$ psql
psql (9.4.5)
Type "help" for help.
# CREATE DATABASE event_pulse;
CREATE DATABASE
# CREATE DATABASE event_pulse_test;
CREATE DATABASE
# \q