chhoumann / p7

7th semester project at Aalborg University implementing a code-exercise site for programming courses.

Home Page:https://p7-six.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

P7

This project aimed to make a unified platform for students to solve programming exercises in Haskell. Users would register for an account and then work on teacher-defined exercises. The exercises would be tested for successful completion automatically and the user would be able to see their progress.

Backend setup

The following commands you are in the backend/webserver folder.

Build the file using:

$ docker build -t webserver .

Builds dockerfile in current directory and names it webserver.

and run it using

$ docker run -p 8000:8000 -e PORT=8000 -e ROCKET_ADDRESS=0.0.0.0 webserver

Runs the webserver image given port and environment variables. Port and address environment variables are necessary.

You may need to prepend sudo, depending on your user permissions / OS.

Frontend setup

The following commands you are in the frontend folder.

To run the frontend, ensure you have npm installed. Then run:

$ npm ci

This installs the latest packages for the project.

Then run:

$ npm run dev

to enter development mode.

This may fail if you do not have the appropriate environment variables set. You can set them in a .env file in the frontend folder. The variables are:

WEBSERVER_ADDRESS=http://localhost:8000

Which depends on the port you set for the backend.

Database

We use Prisma. From the frontend folder, use npx prisma db push to get set up.

Docker example:

$ docker run --name postgres -e POSTGRES_PASSWORD=1234 -p "5432:5432" -d postgres

About

7th semester project at Aalborg University implementing a code-exercise site for programming courses.

https://p7-six.vercel.app


Languages

Language:TeX 45.7%Language:TypeScript 37.5%Language:Rust 8.0%Language:C# 2.9%Language:Haskell 2.7%Language:Dockerfile 1.5%Language:Roff 0.6%Language:CSS 0.6%Language:JavaScript 0.3%Language:Makefile 0.2%Language:Shell 0.1%