- Update
knexfile.jswith the correct database names for Development and Test databases.
-
Copy
env.sampleto.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/usersto view the seeded user data (not all fields are shown).
Some things to note:
- Use "Git bash" to run the commands above.
- After copying
.envfile, open it up and update theDB_USERandDB_PASSWORDto what you have set for your Postgres root user in Windows.