Update README

This commit is contained in:
2024-10-31 21:19:47 +01:00
parent f8728923a5
commit 43f35b7943

View File

@@ -8,6 +8,7 @@ Yet another markdown editor. Work in progress
- File tree navigation - File tree navigation
- Git integration for version control - Git integration for version control
- Dark and light theme support - Dark and light theme support
- Multiple workspaces
- Math equation support (KaTeX) - Math equation support (KaTeX)
- Code syntax highlighting - Code syntax highlighting
@@ -17,15 +18,29 @@ Yet another markdown editor. Work in progress
- Node.js 20 or later - Node.js 20 or later
- gcc (for go-sqlite3 package) - gcc (for go-sqlite3 package)
## Running the Backend ## Setup
Set the following environment variables:
1. Navigate to the `backend` directory
2. Set the following environment variables:
- `CGO_ENABLED=1`: This is necessary for the go-sqlite3 package - `CGO_ENABLED=1`: This is necessary for the go-sqlite3 package
- `NOVAMD_DB_PATH`: Path to the SQLite database file (default: "./sqlite.db") - `NOVAMD_DB_PATH`: Path to the SQLite database file (default: "./sqlite.db")
- `NOVAMD_WORKDIR`: Directory for storing Markdown files (default: "./data") - `NOVAMD_WORKDIR`: Directory for storing Markdown files (default: "./data")
- `NOVAMD_STATIC_PATH`: Path to the frontend build files (default: "../frontend/dist") - `NOVAMD_STATIC_PATH`: Path to the frontend build files (default: "../frontend/dist")
- `NOVAMD_PORT`: Port to run the server on (default: "8080") - `NOVAMD_PORT`: Port to run the server on (default: "8080")
- `NOVAMD_ADMIN_EMAIL`: Admin user email
- `NOVAMD_ADMIN_PASSWORD`: Admin user password
- `NOVAMD_ENCRYPTION_KEY`: 32-byte key for encrypting sensitive data
To generate a secure encryption key you can use openssl:
```bash
openssl rand -base64 32
```
## Running the Backend
1. Navigate to the `backend` directory
2. Ensure all environment variables are set
3. Run the server: 3. Run the server:
``` ```
go run cmd/server/main.go go run cmd/server/main.go