04-database Code Checkpoint
If you get stuck after the Authentication or Neon Postgres Database sections, grab the 04-database solution code and confirm you've done these steps:
Created a Neon account
- Head to Neon.com
- Sign up for an account
- Create a new project - use the most recent version of Postgres and it doesn't matter what cloud or region you choose
- Copy the connection strings and paste it into a .env file at the root of your project.
Created a Stack Auth account
- Sign up for Stack Auth
- Create a new project
- Add these credentials to .env.local:
NEXT_PUBLIC_STACK_PROJECT_IDNEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEYSTACK_SECRET_SERVER_KEY
Seeded the DB and Run the 04-database Code
cd 04-database # using the 04-database code
npm i # install the dependencies
npm run db:generate # generate a DB migration (you might be up to date)
npm run db:migrate # push the migration
npm rn db:seed # seed the DB with a Seed User and Articles
npm run dev #open localhost:3000 and you should have a working application