Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,10 @@

* Make sure that python and virual environment is installed.

* Create a new virtual environment

```python
# one time
virtualenv -p $(which python3) pyenv

# everytime you want to run the server
source pyenv/bin/activate
```

* Now install the requirements

```
pip install -r requirements.txt
```

* If you are installing playwright for the first time, it will ask you to run this command for one time only.

```
playwright install
```

* Now run the server
* To start the server run the following command

```
python server.py
chmod +x run.sh && ./run.sh
```

* The server runs at port `5001`. If you want to change, you can change it in server.py
Expand Down
22 changes: 22 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh

# exit on error
set -e

# create a virtual envoirment if it doesn't exist
if [ ! -d pyenv ]; then
echo "Creating virtual environment"
virtualenv -p $(which python3) pyenv
fi

echo "Activating virtual environment"
source pyenv/bin/activate

echo "Installing requirements"
pip install -r requirements.txt

echo "Installing playwright chromium driver"
playwright install

echo "Starting server"
python server.py