diff --git a/README.md b/README.md index 65f86d4c69d8e820f0ab1830cd15c357063f2abd..2ff05f8e7dd9b985502eec409a3e00250b52cfdb 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