Implement SimpleNote Web API - full REST API with Express

- Express server with CORS, JSON middleware
- Auth middleware (Bearer token)
- Document CRUD with markdown storage
- Library CRUD with nested support
- Tag indexing and search
- Error handler middleware
- Config from env vars
- Init script for data structure
This commit is contained in:
Erwin
2026-03-28 03:27:27 +00:00
parent 0e244d2b30
commit 825dfba2a7
22 changed files with 2864 additions and 20 deletions

18
.env.example Normal file
View File

@@ -0,0 +1,18 @@
# ============ SERVER ============
PORT=3000
HOST=0.0.0.0
# ============ DATA ============
DATA_ROOT=./data
# ============ AUTH ============
ADMIN_TOKEN=snk_initial_admin_token_change_me
# ============ LOGGING ============
LOG_LEVEL=info
# ============ CORS ============
CORS_ORIGIN=*
# ============ API ============
API_PREFIX=/api/v1