From 84618c1f8c197e681ecb69bfb8294be80c852cb0 Mon Sep 17 00:00:00 2001 From: Gustav <gusel725@student.liu.se> Date: Tue, 14 Mar 2023 14:56:09 +0100 Subject: [PATCH] lab3, lab4 hand-in --- README.md | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 65f86d4..2ff05f8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,34 @@ -# Web Programming laborations -This repo contains the laborations in the course TDDD97 done by Gustav and Oliver. \ No newline at end of file +# TDDD97 + +This repo contains the laborations in the course TDDD97 done by Gustav and Oliver. + +## How to run the code + +0. Clone the repository and open the TDDD97 directory in your bash terminal. + +1. Create and run a python virtual environment using *venv* +```bash +python3 -m venv venv +source venv/bin/activate +``` + +2. Install the required python packages using *pip install* + +```bash +pip install -r requirements.txt +``` + +3. Create the database using sqlite3 and the file *schema.sql*. +```bash +sqlite3 database.db < schema.sql +``` + +4. Run the server with *gunicorn* +```bash +gunicorn -b 0.0.0.0:5000 --workers 1 --threads 100 server:app +``` + +5. Use a web browser of your choice and go to localhost port 5000 +``` +localhost:5000/ +``` \ No newline at end of file -- GitLab