This is a Next.js project bootstrapped with create-next-app.
Install dependencies
npm iRun the development server:
npm run devThe app is configured to return a default list of advocates. This will allow you to get the app up and running without needing to configure a database. If you’d like to configure a database, you’re encouraged to do so. You can uncomment the url in .env and the line in src/app/api/advocates/route.ts to test retrieving advocates from the database.
- Feel free to use whatever configuration of postgres you like. The project is set up to use docker-compose.yml to set up postgres. The url is in .env.
docker compose up -d-
Create a
solaceassignmentdatabase. -
Push migration to the database
npx drizzle-kit push- Seed the database
curl -X POST http://localhost:3000/api/seed