Files
NGO/viewer/README.md
T
2026-04-30 19:00:37 +00:00

30 lines
959 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Simple Markdown Viewer
A tiny Node.js app that serves **all** markdown (`.md`) files in the workspace with a twopane UI:
- **Left pane** a collapsible directory tree.
- **Right pane** the selected markdown rendered to HTML.
## Features
- Autodetects directories and markdown files.
- Click a folder to expand/collapse.
- Click a file to view it instantly.
- Runs on **port 8100** (http://localhost:8100).
- No build step just `npm install` and `npm start`.
## Install & Run
```bash
cd /viewer
npm install # installs express & markdown-it
npm start
```
Open your browser at `http://localhost:8100`.
The server serves the whole workspace (the parent of the `viewer` folder) as the markdown root, so you can browse any `.md` file, e.g. `Projects/POS/ICP.md`.
## Files
- `server.js` Express backend with two APIs (`/api/tree` and `/api/md`).
- `public/` static HTML/CSS/JS for the UI.
- `package.json` npm metadata.
Enjoy!