Skip to content

Instantly share code, notes, and snippets.

@kimschles
Last active April 26, 2018 17:28
Show Gist options
  • Select an option

  • Save kimschles/ae21e12a9eda56be8dbb9ee46dbd771b to your computer and use it in GitHub Desktop.

Select an option

Save kimschles/ae21e12a9eda56be8dbb9ee46dbd771b to your computer and use it in GitHub Desktop.

How to setup a postgres db with knex

  1. Create a db on my computer
  • createdb <name_of_database>
  1. Create tables in the db using the migration files
  • knex migrate:latest
  1. Add data to the database and tables
  • knex seed:run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment