Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
CSEGroup22SDP/readme.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
58 lines (44 sloc)
2.9 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CSE4939W/CSE4940 Senior Design Project Group 22 | |
Group 22 in 2020-2021 CSE SDP is assigned to make a simulator and visualization of DDoS Filtering. | |
## Installing flask: | |
There are two options to get started on Windows. | |
### Option 1: Get Started for Flask on Windows with Python for Windows. (Recommended!) | |
The essential thing to get started is to install `Python` and then to install `flask`. Due to the versioning issues of `Python`, please make sure you are installing the correct version. We recommend installing `Python` via the official website: https://www.python.org/downloads/ <br> | |
As an additional note, Windows 7 is no longer supported in `3.9.x` version of `Python`. Please download the [3.8.8 version](https://www.python.org/downloads/release/python-388/) in case you are using Windows 7. | |
Follow these steps to get started: | |
1. Install the latest version of `Python` and make sure you selected to add `Python` to `PATH` environment variable. | |
2. Execute the following command to install `flask`: | |
```bat | |
pip install flask | |
pip install matplotlib | |
``` | |
3. Execute the following commands to run flask: | |
```bat | |
set FLASK_APP=pserver | |
set FLASK_ENV=development | |
python -m flask run | |
``` | |
Alternatively, you may double-click `run_server.bat` file in lieu of manually typing these commands. | |
4. In certain circumstances, your system might be configuring the `*.js` files with incorrect treatings. Locate registry key `HKEY_CLASSES_ROOT\.js` and edit the key value `Content Type` to be `text/javascript`. <br> | |
Please note that you are all set if key value `Content Type` does not exist in `HKEY_CLASSES_ROOT\.js` key at all: just leave the registry as is. Usually, things are problematic if the value of `Content Type` equals to `text/plain`. | |
### Option 2: Get Started on Windows with WSL | |
***NOTE: Make sure to only install WSL1, not WSL2 so follow step 1 and then skip to step 6. So the only steps you need to follow are 1 and 6.***\ | |
***IMPORTANT: On the windows store, make sure you install Ubuntu 18.04 LTS.*** | |
Link: | |
https://docs.microsoft.com/en-us/windows/wsl/install-win10 | |
Setting up venv (virtual environment) | |
***NOTE: Don't place your env within the git repo*** | |
Link: | |
https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-ubuntu-18-04 | |
Link: https://www.digitalocean.com/community/tutorials/how-to-make-a-web-application-using-flask-in-python-3 | |
1) You only need to follow step 1 to install flask. | |
2) Copy and paste and then run the below two commands. ***You have to do this everytime you open up a new terminal***: | |
```bash | |
export FLASK_APP=pserver | |
export FLASK_ENV=development | |
flask run | |
``` | |
## Output Files | |
For each simulation session, the backend would generate a summary file, a log file and several statistical graphs. Their locations are specified by your input on frontend. <br> | |
## License | |
This project is under NCSA License. For more information, view the [license](license.txt). |