This is a development server for testing APIs integration with NeuroVis.
- /static/
- main.py
-
/static/holds the files you want to serve, they will become available at http://localhost:8000/FILE-NAME -
main.pyholds all the server setup, start and routes configurations
/handshake - To check is the server is OK. return {"status": "OK"}
/listFiles - Will send all the file names inside the static folder. return { "files": string[]}
http://localhost:8000/FILE-NAME - Public route to directly access a file. return file data
Make sure the server runs on port 8000, NeuroVis looks for the server there, or change the url in NeuroVis files.
-
Create a Virtual Environment
On a terminal, run:
python -m venv .venv -
Activate it
source .venv/bin/activate2.5 You might need to update 'pip'
python -m pip install --upgrade pip -
Install FastAPI
pip install "fastapi[standard]" -
Start the server
python main.py
For any issues check the FastAPI guide