75 lines
1.4 KiB
Markdown
75 lines
1.4 KiB
Markdown
# DocLink Web
|
|
|
|
Server-rendered rebuild of the DocLink web app, following the structure in `project-specs/`.
|
|
|
|
## Stack
|
|
|
|
- Node.js HTTP server
|
|
- HTMX for partial updates
|
|
- Custom responsive CSS
|
|
- Upstream API adapter for auth, order, result, FPP, password change, and special message flows
|
|
|
|
## Run
|
|
|
|
```bash
|
|
npm start
|
|
```
|
|
|
|
Open:
|
|
|
|
```text
|
|
http://localhost:5173
|
|
```
|
|
|
|
To serve under a subfolder like `https://domain.com/folder`, set:
|
|
|
|
```bash
|
|
DOCLINK_BASE_PATH=/folder npm start
|
|
```
|
|
|
|
That makes internal links, HTMX requests, and redirects stay under the same folder.
|
|
|
|
## Click To Run
|
|
|
|
If you want a one-click launcher on macOS/Linux:
|
|
|
|
```bash
|
|
./start.sh
|
|
```
|
|
|
|
Stop the background server with:
|
|
|
|
```bash
|
|
./stop.sh
|
|
```
|
|
|
|
To stop a specific running port:
|
|
|
|
```bash
|
|
./stop.sh 5201
|
|
```
|
|
|
|
or:
|
|
|
|
```bash
|
|
PORT=5201 ./stop.sh
|
|
```
|
|
|
|
If you run the server in the foreground, stop it with `Ctrl+C`.
|
|
|
|
## Notes
|
|
|
|
- Login calls the upstream API from `project-specs/API_ENDPOINTS.md`.
|
|
- If the upstream login rejects the credentials or is unavailable, demo mode creates a local session so the UI can still be exercised.
|
|
- Order search, order detail helpers, FPP loading, password change, and special message save are wired through the API adapter with mock fallback for local preview.
|
|
- `start.sh` writes a pid file named `.doclink-web.pid` and a log file named `doclink-web.log`.
|
|
- Deployment templates are in `deploy/`.
|
|
|
|
## Main Files
|
|
|
|
- `server.js`
|
|
- `styles.css`
|
|
- `package.json`
|
|
- `start.sh`
|
|
- `stop.sh`
|