Table of Contents
This server is already deployed, so the instructions below are just in case you want to run the server locally (or change the code yourself).
There are 2 ways of running this server locally:
-
Via Docker - the server will run locally, but you will not be able to change the code. This method is extremely easy, is unlikely to have failing dependency problems, and also runs much quicker since liboqs doesn't need to be re-compiled.
-
Via Python as a litestar application - the server will run locally and you will need to change the code.
- Docker
Firstly, ensure docker is running and active. Then, run the following command:
docker run -p 8000:8000 raghav2005/qpg-serverIf it is easier, make docker can also be run instead of that command (it runs the same thing).
- Pipenv
Navigate to the backend/ directory.
Then, to install the dependencies, run:
pipenv install -r requirements.txt && pipenv installYou can either run the server directly, without spawning a new shell for pipenv, or you can activate the environment and run the server.
For the first option, run the following command:
pipenv run python -m litestar run --host 0.0.0.0 --port 8000For the second, run the following commands in order:
pipenv shell
litestar run --host 0.0.0.0 --port 8000NOTE: You can check if the server is running by trying to access
http://localhost:8000in a browser. If you see {"status":"success"} on the screen, the server is running.
- Instead of using the commands listed above individually, you can run
make docker,make install, ormake runfrom the root directory of this repository to run the server.
This project is licensed under the terms of the MIT license. Refer to LICENSE for more information.