listings
Web accessible project index for this repository.
Path: /home/moose/Projects/listings
README
# listings
Web-accessible project index for this repository.
## What it does
- Scans top-level folders in the repo.
- Treats each folder as a project.
- Pulls a short description from each project's README.
- Serves HTML and JSON endpoints over HTTP.
- Adds links for each project in the UI:
- Local detail page (`/projects/<name>`)
- Web UI link (`/` for `listings`, `/<name>/` for other detected web apps)
- Optional external project URL (`PROJECT_LINK_BASE/<name>`)
## Run the web app
From this directory:
```bash
cd /home/moose/Projects/listings
npm start
```
Default bind/port:
- Host: `0.0.0.0`
- Port: `3000`
Expected URL on your host:
- `http://167.71.115.212:3000`
Optional env vars:
```bash
HOST=0.0.0.0 PORT=8080 npm start
```
Optional external link base:
```bash
PROJECT_LINK_BASE="https://github.com/your-org" npm start
```
Optional absolute base for Web UI links:
```bash
WEB_UI_BASE="http://167.71.115.212" npm start
```
## Endpoints
- `/` -> HTML table
- `/api/projects` -> JSON payload
- `/projects/<name>` -> project detail page
- `/api/projects/<name>` -> project detail JSON
- `/healthz` -> health check
## Optional Nginx reverse proxy
If you want to expose this on port 80 and keep Node on localhost:
```nginx
server {
listen 80;
server_name 167.71.115.212;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
```
## Optional CLI (existing)
The original CLI script is still available:
```bash
python3 listings.py
```