Added instructions to serve the status page

This commit is contained in:
ybouane 2024-11-14 11:23:06 -05:00 committed by GitHub
parent 91851ce3e9
commit eaef31dc1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -91,3 +91,24 @@ Save current pm2 processes list
```shell
pm2 save
```
### Serving the status page
The `watcher.js` script only takes care of running the status checks and updates the `status.json` file in the `static/` folder. If you want to view the final result, you simply need to serve the files in the `static/` folder. You can use Nginx with a config like:
```nginx
# Pulse
server {
root /var/www/apulse/static/;
index index.html;
server_name apulse.ybouane.com;
location /favicon.ico {
return 301 "/favicon.png";
}
listen 80;
}
```
Or use any other tool to serve those files like the npm http-server package:
```shell
cd static
npx http-server -o ./
```