Skip to content

deeptownadmintools/web-server

Repository files navigation

Web server

Build Status

Bot: invite

API: Postman

Running the server

  1. To run this server, you will need access to a running main server, or this web server already connected to the already mentioned main server. Thus, you can either host your own main server, or connect to the one already running at dtat.hampl.space.
  2. Create a virtual environment with Python>=3.7 (older versions should work without a problem, but it was not tested)
  3. Add these lines at the end of the activation script:
    export FLASK_APP=webapp
    export FLASK_DEBUG=1
    
  4. Enter into virtual environment
  5. Install requirements pip install -e .
  6. Create a file named "privateConfig.py" within the "webapp" directory, and insert url for the main server you would like to connect to, unless you want to use the default value in "defaultConfig.py":
    DTAT_HOST_URL = 'http://your.url/'
    
  7. You are now all set and you can start the server with following command:
    flask run
    
    This server will be running on default Flask port 5000 and it will be accessible only from localhost, which you can change by using --port=5002 and --host=0.0.0.0

Contributing

  1. If you want to contribute to the main repository please ensure, that your code is following the PEP8 convention. You can do that with the use of flake8 and autopep8, which you can install using pip install -r dev-requirements.txt, after activating your virtual environment.

API

If you would like to use current API methods or just view them, you can do so here.

Bugs & Improvements

If you have found a bug, or you have an idea for new feature please create an issue here on github. You can also contact me using email: [email protected]