Skip to content

Latest commit

 

History

History
81 lines (48 loc) · 2.55 KB

README.md

File metadata and controls

81 lines (48 loc) · 2.55 KB

README

Installation & Setup

To install the backend Python packages:

cd api && pip install -r requirements.txt && cd -

To install the frontend NPM packages:

npm install

You will need a .env.local in the root directory and a .env in the api/ folder with the relevant Supabase environment variables in each file.

Local Development

To start the frontend and backend locally together, simply run npm run dev. Ctrl+C will kill both processes.

Backend

To run the local backend server individually: npm run flask-dev.

To lint the backend code: python -m pylint *.py.

To access the local backend server: http://127.0.0.1:5328/api/ping.

However, Next.js redirects API calls to the web app to the Python backend server, so the API is also accessible at: http://localhost:3000/api/ping. This is configured at next.config.mjs.

Frontend

To run the local frontend application individually: npm run next-dev.

To lint the frontend code: npm run lint.

To access the local frontend application: localhost:3000.

Misc

To save a Python package to api/requirements.txt, use pigar: pip install pigar then pigar generate. Do not use pip freeze.

This is a Next.js project bootstrapped with create-next-app.