viewer.js
require('dotenv').config();
const express = require('express');
const path = require('node:path');
const app = express();
const PORT = Number(process.env.VIEWER_PORT || 9893);
app.use(express.static(path.join(__dirname, 'public')));
app.listen(PORT, '127.0.0.1', () => {
console.log(`[visual-factory] viewer listening on http://127.0.0.1:${PORT}`);
});