https://github.com/jdk2pq/solace-candidate-assignment
https://github.com/jdk2pq/solace-candidate-assignment
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jdk2pq/solace-candidate-assignment
- Owner: jdk2pq
- Created: 2025-02-26T18:33:48.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-26T22:33:00.000Z (3 months ago)
- Last Synced: 2025-02-28T22:10:30.588Z (3 months ago)
- Language: TypeScript
- Size: 197 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Solace Candidate Assignment
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
## Getting Started
Install dependencies
```bash
npm i
```Run the development server:
```bash
npm run dev
```## Database set up
The 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.
1. 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.
```bash
docker compose up -d
```2. Create a `solaceassignment` database.
3. Push migration to the database
```bash
npx drizzle-kit push
```4. Seed the database
```bash
curl -X POST http://localhost:3000/api/seed
```