- Update
knexfile.js
with the correct database names for Development and Test databases.
-
Copy
env.sample
to.env
-
Prepare the databases
NODE_ENV=development npm run db:migrate NODE_ENV=test npm run db:migrate
-
Prepare the seed data for development
NODE_ENV=development npm run db:seed
-
Start the app for local development
npm run dev
-
Visit
http://localhost:3001/users
to view the seeded user data (not all fields are shown).
Some things to note:
- Use "Git bash" to run the commands above.
- After copying
.env
file, open it up and update theDB_USER
andDB_PASSWORD
to what you have set for your Postgres root user in Windows.