NexusNote is the backend service for the NexusNote application. This document provides instructions on how to install and run the server in both development and production environments.
Before proceeding, ensure that you have the following installed:
- uv – A necessary tool for syncing resources.
- ollama - Required for local LLM, embedding models.
- MongoDB - Required for database operations.
- Python (version 3.10 or higher) and the required dependencies for FastAPI.
After installing uv, run the following command to synchronize resources:
uv sync
For development, you can run the FastAPI server with auto-reload enabled. This allows the server to automatically restart whenever you make changes to the code:
fastapi run --reload app/main.py
- Server URL: http://localhost:8000
- Swagger Documentation: http://localhost:8000/docs
To run the application in a production environment, use Gunicorn with the provided configuration file:
gunicorn -c gunicorn_conf.py main:app
This command will start the application using Gunicorn, which is well-suited for production deployments.
You can execute the tests using the provided script:
./scripts/test.sh
For further information and examples, consider reviewing the following references: