From cbbc88b94a096456529002b5e0b7f229a799771b Mon Sep 17 00:00:00 2001 From: Sara Abdullahi Date: Fri, 29 Nov 2024 15:31:35 +0000 Subject: [PATCH] more details about setting environment variables for development --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 13a542a..b9b9053 100644 --- a/README.md +++ b/README.md @@ -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: