Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ The API routes are in `./pages/api`. All files in this directory are treated as
## Development

1. Clone this repository
2. Copy `.env.example` to `.env` and fill in the environment variables
2. Copy `.env.example` to `.env` and fill in the [environment variables](#environment-variables)
3. Run `npm install` to install dependencies
4. Run `npx prisma generate` to generate the local Prisma client (used for database interactions)
5. Run `npm run dev` to run the development server (with hot reloading etc.) -- by default this will be on [port 3000](localhost:3000)

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

### Environment Variables

- Use [https://uclapi.com] to generate a Client ID and Client Secret. Set the callback URL to be `http://hosturl/api/auth/callback/uclapi` where `hosturl` is your host URL
- For Postgres details, user=`enghub`, db=`enghub`, password=`enghub`, and host=`127.0.0.1`
- NextAuth secret can be anything, but the URL must be commented out

## Database migrations

Migrations are managed through Prisma. One potential workflow is:
Expand Down