Prerequisits:
- Next.js
- Node.js
- npm
- postgresql
- psycopg2, dotenv (python packages)
- Clone the repository
- Run
npm installin the root directory - Set up postgresql database:
sudo -i -u postgres
psql
DROP DATABASE IF EXISTS "24urenloop";
DROP USER IF EXISTS <username>;
CREATE USER <username> WITH PASSWORD '<password>' CREATEDB;
CREATE DATABASE "24urenloop" OWNER <username>;
GRANT ALL ON SCHEMA public TO <username>;
ALTER SCHEMA public OWNER TO <username>;
- Create a .env file with the correct database credentials:
DATABASE_URL=postgres://<username>:<password>@localhost:5432/24urenloop
- Run
npx prisma migrate deployto create the database tables - Run
python3 initialize_db.pyto fill the database with the necessary dummy data - Run
npm run devto start the development server - Go to
localhost:3000in your browser