diff options
| -rw-r--r-- | README.md | 40 |
1 files changed, 19 insertions, 21 deletions
@@ -27,35 +27,35 @@ What this application ***IS NOT***: - Secure: This was designed to be used locally on a machine - Performant: It was designed for use by a single admin user -## How to run +## How to install + +With [python](https://realpython.com/installing-python/) installed, run the following command preferably in a seperate virtual environment. + +### Using pip + +```bash +pip install git+https://gitlab.com/KaranJayachandra/match_up.git +``` + +### How to complile from source Please install [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [python](https://realpython.com/installing-python/) on your machine before proceeding further. Once installed, open the terminal to a folder of your choosing and run the following commands to setup the application. -```powershell +```bash git clone https://gitlab.com/KaranJayachandra/match_up.git cd match_up python -m venv .venv .venv\Scripts\activate -pip install -r requirements.txt +pip install . ``` -Now create a file called .env with the environment variables needed by the application. An example is shown below. - -```text -DATABASE = "database.csv" -COURTS = 10 -APP_SETTINGS = "config.DevelopmentConfig" -``` - -The `DATABASE` variable contains the list of players which is just a simple CSV file with two columns, the first containing their name and the second containing their skill level from 1 to 10. The `COURTS` variable is the number of spaces or slots you have for creating pairings. `APP_SETTINGS` should be chosen between `config.DevelopmentConfig` or `config.ProductionConfig` based on the deployment. - -The application can then be run using (ensure you are in the virtual environment if you closed the terminal after the previous steps): +To run the application, just run: -```powershell -flask run +```bash +match_up ``` -The application should be running now and the terminal should display the ip and port number. Most modern terminals will allow you to navigate directly to the application by clicking on the displayed address. +The application should be running now in 'localhost', just navigate there using a browser. Use the `--help` option to get an explanation of the application. ## Technology used @@ -65,11 +65,9 @@ This is a simple application build using [flask](https://flask.palletsprojects.c Create a powershell script with the following content in the folder with the code. -```powershell -$env:DATABASE = "<data-base-file-name>.csv" -$env:APP_SETTINGS = "config.ProductionConfig" +```bash .venv\Scripts\activate -pythonw -m flask run -p <port-number> +pythonw match_up ``` Create a task using Task Scheduler to run this script on start up. |
