mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-05 15:44:21 +00:00
Update README
This commit is contained in:
27
README.md
27
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
|
||||
|
||||
Reference in New Issue
Block a user