From 43f35b79437ba4ddf3fdedc22e26ccd1e4280d64 Mon Sep 17 00:00:00 2001 From: LordMathis Date: Thu, 31 Oct 2024 21:19:47 +0100 Subject: [PATCH] Update README --- README.md | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4bfdd06..b27ef8f 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Yet another markdown editor. Work in progress - File tree navigation - Git integration for version control - Dark and light theme support +- Multiple workspaces - Math equation support (KaTeX) - Code syntax highlighting @@ -17,15 +18,29 @@ Yet another markdown editor. Work in progress - Node.js 20 or later - gcc (for go-sqlite3 package) +## Setup + +Set the following environment variables: + +- `CGO_ENABLED=1`: This is necessary for the go-sqlite3 package +- `NOVAMD_DB_PATH`: Path to the SQLite database file (default: "./sqlite.db") +- `NOVAMD_WORKDIR`: Directory for storing Markdown files (default: "./data") +- `NOVAMD_STATIC_PATH`: Path to the frontend build files (default: "../frontend/dist") +- `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. Set the following environment variables: - - `CGO_ENABLED=1`: This is necessary for the go-sqlite3 package - - `NOVAMD_DB_PATH`: Path to the SQLite database file (default: "./sqlite.db") - - `NOVAMD_WORKDIR`: Directory for storing Markdown files (default: "./data") - - `NOVAMD_STATIC_PATH`: Path to the frontend build files (default: "../frontend/dist") - - `NOVAMD_PORT`: Port to run the server on (default: "8080") +2. Ensure all environment variables are set 3. Run the server: ``` go run cmd/server/main.go