pulse-hub 3.5.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/backend/.env.example +52 -52
- package/backend/agent.js +372 -372
- package/backend/cli.js +23 -1
- package/backend/emails/env-backup.html +52 -52
- package/backend/emails/invite.html +53 -53
- package/backend/lib/agent-rpc.js +72 -72
- package/backend/lib/async-route.js +17 -17
- package/backend/lib/authz/bootstrap.js +35 -35
- package/backend/lib/authz/catalog.js +291 -291
- package/backend/lib/authz/delegation.js +104 -104
- package/backend/lib/authz/effective.js +104 -104
- package/backend/lib/authz/engine.js +251 -251
- package/backend/lib/authz/index.js +134 -134
- package/backend/lib/authz/migrate.js +871 -871
- package/backend/lib/authz/mutate.js +87 -87
- package/backend/lib/authz/preview.js +327 -327
- package/backend/lib/authz/scope.js +282 -282
- package/backend/lib/env-mask.js +131 -131
- package/backend/lib/invite-helpers.js +83 -83
- package/backend/lib/invites.js +160 -160
- package/backend/lib/logs.js +244 -244
- package/backend/lib/metrics.js +249 -249
- package/backend/lib/relay-state.js +564 -564
- package/backend/lib/session.js +48 -48
- package/backend/middleware/authz.js +65 -65
- package/backend/public/assets/favicon.svg +6 -6
- package/backend/public/assets/index.js +1 -1
- package/backend/public/index.html +23 -24
- package/backend/routes/access.js +123 -123
- package/backend/routes/audit.js +41 -41
- package/backend/routes/auth.js +207 -207
- package/backend/routes/invites-public.js +91 -91
- package/backend/routes/invites.js +121 -121
- package/backend/routes/logs.js +68 -68
- package/backend/routes/metrics.js +76 -76
- package/backend/routes/policies.js +240 -240
- package/backend/routes/teams.js +221 -221
- package/backend/routes/users.js +100 -100
- package/backend/seed-admins.js +68 -68
- package/backend/server.js +106 -106
- package/backend/ws/agent-relay.js +159 -159
- package/package.json +1 -1
package/backend/seed-admins.js
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
// Seeds empty user rows for a comma-separated allowlist of emails, so those people can
|
|
2
|
-
// sign in via "Sign in with Google" directly without going through the invite-by-email
|
|
3
|
-
// flow. Sign-in is Google-only now (password login was removed — see CLAUDE.md's "Auth
|
|
4
|
-
// model"), so this is the ONLY way a fresh install gets its first user before
|
|
5
|
-
// PULSE_GMAIL_ADDRESS/PULSE_GMAIL_APP_PASSWORD are configured (the invite flow needs an
|
|
6
|
-
// existing user to send the invite). A seeded row has no google_id yet; it links to that
|
|
7
|
-
// person's Google account the same way an invited user's email already does — via the
|
|
8
|
-
// verified-email match in routes/auth.js's /auth/google/callback — on their first sign-in.
|
|
9
|
-
//
|
|
10
|
-
// Also handles PULSE_SUPER_ADMIN_EMAILS (see CLAUDE.md's "Auth model" / roles): those
|
|
11
|
-
// emails get seeded (if not already known) with the super_admin role instead of the
|
|
12
|
-
// usual viewer default, and — since re-running this script is also the only way to make
|
|
13
|
-
// an EXISTING user a super_admin later — an already-known user whose email is in that
|
|
14
|
-
// list gets promoted here too. PULSE_SEED_ADMIN_EMAILS and PULSE_SUPER_ADMIN_EMAILS are
|
|
15
|
-
// independent: an email only needs to be in one of them to be handled by this script.
|
|
16
|
-
//
|
|
17
|
-
// Deliberately an explicit CLI action, not something that runs automatically on every
|
|
18
|
-
// hub startup: this changes who can access the hub, so it should happen because an
|
|
19
|
-
// operator asked for it right now, not silently as a side effect of a restart.
|
|
20
|
-
//
|
|
21
|
-
// The email lists themselves live only in backend/.env's PULSE_SEED_ADMIN_EMAILS /
|
|
22
|
-
// PULSE_SUPER_ADMIN_EMAILS (see backend/.env.example) — never as a workflow input or
|
|
23
|
-
// repo variable. The deploy workflow's "seed_admin_emails" checkbox only controls
|
|
24
|
-
// whether this script gets run on that deploy; it never supplies the emails themselves.
|
|
25
|
-
//
|
|
26
|
-
// Usage: node seed-admins.js
|
|
27
|
-
|
|
28
|
-
require('dotenv').config({ path: require('./lib/paths').ENV_FILE });
|
|
29
|
-
const db = require('./lib/db');
|
|
30
|
-
|
|
31
|
-
function parseEmailList(raw) {
|
|
32
|
-
return (raw || '')
|
|
33
|
-
.split(',')
|
|
34
|
-
.map((e) => e.trim().toLowerCase())
|
|
35
|
-
.filter(Boolean);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function main() {
|
|
39
|
-
const seedEmails = parseEmailList(process.env.PULSE_SEED_ADMIN_EMAILS);
|
|
40
|
-
const superAdminEmails = parseEmailList(process.env.PULSE_SUPER_ADMIN_EMAILS);
|
|
41
|
-
const allEmails = [...new Set([...seedEmails, ...superAdminEmails])];
|
|
42
|
-
if (allEmails.length === 0) {
|
|
43
|
-
console.error(
|
|
44
|
-
`Neither PULSE_SEED_ADMIN_EMAILS nor PULSE_SUPER_ADMIN_EMAILS is set in ${require('./lib/paths').ENV_FILE} — add at least one (see backend/.env.example), then re-run.`,
|
|
45
|
-
);
|
|
46
|
-
process.exit(1);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const superAdminSet = new Set(superAdminEmails);
|
|
50
|
-
for (const email of allEmails) {
|
|
51
|
-
const existing = db.getUserByEmail(email);
|
|
52
|
-
if (!existing) {
|
|
53
|
-
// role is assigned automatically from PULSE_SUPER_ADMIN_EMAILS — see
|
|
54
|
-
// defaultRoleForEmail in lib/db.js.
|
|
55
|
-
const user = db.createSeedUser(email);
|
|
56
|
-
console.log(
|
|
57
|
-
`Seeded ${email} as ${user.role}: can now sign in with "Sign in with Google" using this email.`,
|
|
58
|
-
);
|
|
59
|
-
} else if (superAdminSet.has(email) && existing.role !== db.ROLES.SUPER_ADMIN) {
|
|
60
|
-
db.promoteToSuperAdmin(existing.id);
|
|
61
|
-
console.log(`Promoted ${email} to super_admin.`);
|
|
62
|
-
} else {
|
|
63
|
-
console.log(`Skipped ${email}: already a known user (role: ${existing.role}).`);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
main();
|
|
1
|
+
// Seeds empty user rows for a comma-separated allowlist of emails, so those people can
|
|
2
|
+
// sign in via "Sign in with Google" directly without going through the invite-by-email
|
|
3
|
+
// flow. Sign-in is Google-only now (password login was removed — see CLAUDE.md's "Auth
|
|
4
|
+
// model"), so this is the ONLY way a fresh install gets its first user before
|
|
5
|
+
// PULSE_GMAIL_ADDRESS/PULSE_GMAIL_APP_PASSWORD are configured (the invite flow needs an
|
|
6
|
+
// existing user to send the invite). A seeded row has no google_id yet; it links to that
|
|
7
|
+
// person's Google account the same way an invited user's email already does — via the
|
|
8
|
+
// verified-email match in routes/auth.js's /auth/google/callback — on their first sign-in.
|
|
9
|
+
//
|
|
10
|
+
// Also handles PULSE_SUPER_ADMIN_EMAILS (see CLAUDE.md's "Auth model" / roles): those
|
|
11
|
+
// emails get seeded (if not already known) with the super_admin role instead of the
|
|
12
|
+
// usual viewer default, and — since re-running this script is also the only way to make
|
|
13
|
+
// an EXISTING user a super_admin later — an already-known user whose email is in that
|
|
14
|
+
// list gets promoted here too. PULSE_SEED_ADMIN_EMAILS and PULSE_SUPER_ADMIN_EMAILS are
|
|
15
|
+
// independent: an email only needs to be in one of them to be handled by this script.
|
|
16
|
+
//
|
|
17
|
+
// Deliberately an explicit CLI action, not something that runs automatically on every
|
|
18
|
+
// hub startup: this changes who can access the hub, so it should happen because an
|
|
19
|
+
// operator asked for it right now, not silently as a side effect of a restart.
|
|
20
|
+
//
|
|
21
|
+
// The email lists themselves live only in backend/.env's PULSE_SEED_ADMIN_EMAILS /
|
|
22
|
+
// PULSE_SUPER_ADMIN_EMAILS (see backend/.env.example) — never as a workflow input or
|
|
23
|
+
// repo variable. The deploy workflow's "seed_admin_emails" checkbox only controls
|
|
24
|
+
// whether this script gets run on that deploy; it never supplies the emails themselves.
|
|
25
|
+
//
|
|
26
|
+
// Usage: node seed-admins.js
|
|
27
|
+
|
|
28
|
+
require('dotenv').config({ path: require('./lib/paths').ENV_FILE });
|
|
29
|
+
const db = require('./lib/db');
|
|
30
|
+
|
|
31
|
+
function parseEmailList(raw) {
|
|
32
|
+
return (raw || '')
|
|
33
|
+
.split(',')
|
|
34
|
+
.map((e) => e.trim().toLowerCase())
|
|
35
|
+
.filter(Boolean);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function main() {
|
|
39
|
+
const seedEmails = parseEmailList(process.env.PULSE_SEED_ADMIN_EMAILS);
|
|
40
|
+
const superAdminEmails = parseEmailList(process.env.PULSE_SUPER_ADMIN_EMAILS);
|
|
41
|
+
const allEmails = [...new Set([...seedEmails, ...superAdminEmails])];
|
|
42
|
+
if (allEmails.length === 0) {
|
|
43
|
+
console.error(
|
|
44
|
+
`Neither PULSE_SEED_ADMIN_EMAILS nor PULSE_SUPER_ADMIN_EMAILS is set in ${require('./lib/paths').ENV_FILE} — add at least one (see backend/.env.example), then re-run.`,
|
|
45
|
+
);
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const superAdminSet = new Set(superAdminEmails);
|
|
50
|
+
for (const email of allEmails) {
|
|
51
|
+
const existing = db.getUserByEmail(email);
|
|
52
|
+
if (!existing) {
|
|
53
|
+
// role is assigned automatically from PULSE_SUPER_ADMIN_EMAILS — see
|
|
54
|
+
// defaultRoleForEmail in lib/db.js.
|
|
55
|
+
const user = db.createSeedUser(email);
|
|
56
|
+
console.log(
|
|
57
|
+
`Seeded ${email} as ${user.role}: can now sign in with "Sign in with Google" using this email.`,
|
|
58
|
+
);
|
|
59
|
+
} else if (superAdminSet.has(email) && existing.role !== db.ROLES.SUPER_ADMIN) {
|
|
60
|
+
db.promoteToSuperAdmin(existing.id);
|
|
61
|
+
console.log(`Promoted ${email} to super_admin.`);
|
|
62
|
+
} else {
|
|
63
|
+
console.log(`Skipped ${email}: already a known user (role: ${existing.role}).`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
main();
|
package/backend/server.js
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
// Loaded first, before config.js (or anything else) reads process.env at require-time —
|
|
2
|
-
// dotenv only fills in vars that aren't already set, so this is a no-op (and harmless)
|
|
3
|
-
// on a box where PULSE_GOOGLE_*/PULSE_PUBLIC_URL are set some other way (systemd
|
|
4
|
-
// Environment=, a container's env, etc.) rather than via backend/.env. See
|
|
5
|
-
// backend/.env.example. The file's location is backend/.env unless PULSE_ENV_FILE says
|
|
6
|
-
// otherwise (the npm-installed hub uses /etc/pulse-hub/hub.env) — see lib/paths.js.
|
|
7
|
-
require('dotenv').config({ path: require('./lib/paths').ENV_FILE });
|
|
8
|
-
|
|
9
|
-
const http = require('http');
|
|
10
|
-
const express = require('express');
|
|
11
|
-
const config = require('./config');
|
|
12
|
-
|
|
13
|
-
const sessionGate = require('./middleware/session-gate');
|
|
14
|
-
const { requestId, attachAuthz } = require('./middleware/authz');
|
|
15
|
-
|
|
16
|
-
const authRoutes = require('./routes/auth');
|
|
17
|
-
const invitesPublicRoutes = require('./routes/invites-public');
|
|
18
|
-
const staticRoutes = require('./routes/static');
|
|
19
|
-
const usersRoutes = require('./routes/users');
|
|
20
|
-
const invitesRoutes = require('./routes/invites');
|
|
21
|
-
const teamsRoutes = require('./routes/teams');
|
|
22
|
-
const policiesRoutes = require('./routes/policies');
|
|
23
|
-
const accessRoutes = require('./routes/access');
|
|
24
|
-
const auditRoutes = require('./routes/audit');
|
|
25
|
-
const instancesRoutes = require('./routes/instances');
|
|
26
|
-
const metricsRoutes = require('./routes/metrics');
|
|
27
|
-
const logsRoutes = require('./routes/logs');
|
|
28
|
-
const envFilesRoutes = require('./routes/env-files');
|
|
29
|
-
|
|
30
|
-
const audit = require('./lib/audit');
|
|
31
|
-
const { checkConfig, formatFindings } = require('./lib/config-check');
|
|
32
|
-
const wss = require('./ws/agent-relay');
|
|
33
|
-
|
|
34
|
-
// Audit retention (PULSE_AUDIT_RETENTION_DAYS, default 180): prune once at boot, then hourly.
|
|
35
|
-
audit.prune();
|
|
36
|
-
setInterval(() => audit.prune(), 60 * 60 * 1000).unref();
|
|
37
|
-
|
|
38
|
-
const app = express();
|
|
39
|
-
|
|
40
|
-
// Trust proxy (nginx on 127.0.0.1) for IP address in audit logs
|
|
41
|
-
app.set('trust proxy', 'loopback');
|
|
42
|
-
|
|
43
|
-
// Request ID and auth middleware (run first)
|
|
44
|
-
app.use(requestId);
|
|
45
|
-
|
|
46
|
-
// ---- Public routes: no session required, matched before the session gate below ----
|
|
47
|
-
|
|
48
|
-
// Liveness + "which build is answering" for `pulse-hub setup`/`upgrade`/`doctor`, which
|
|
49
|
-
// poll it after a restart to confirm the NEW version is the one serving. Deliberately
|
|
50
|
-
// tiny: no auth state, no config, just the semver already shown in the UI.
|
|
51
|
-
app.get('/healthz', (req, res) => {
|
|
52
|
-
res.json({ ok: true, version: config.APP_VERSION });
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
app.use(authRoutes);
|
|
56
|
-
app.use(invitesPublicRoutes);
|
|
57
|
-
app.use(staticRoutes);
|
|
58
|
-
|
|
59
|
-
// ---- Everything past here requires a session (or, for a STATIC_FILES page path,
|
|
60
|
-
// redirects to login) — see middleware/session-gate.js ----
|
|
61
|
-
app.use(sessionGate);
|
|
62
|
-
app.use(attachAuthz);
|
|
63
|
-
|
|
64
|
-
app.use(usersRoutes);
|
|
65
|
-
app.use(invitesRoutes);
|
|
66
|
-
app.use(teamsRoutes);
|
|
67
|
-
app.use(policiesRoutes);
|
|
68
|
-
app.use(accessRoutes);
|
|
69
|
-
app.use(auditRoutes);
|
|
70
|
-
app.use(instancesRoutes);
|
|
71
|
-
app.use(metricsRoutes);
|
|
72
|
-
app.use(logsRoutes);
|
|
73
|
-
app.use(envFilesRoutes);
|
|
74
|
-
|
|
75
|
-
app.use((req, res) => {
|
|
76
|
-
res.writeHead(404);
|
|
77
|
-
res.end(JSON.stringify({ error: { code: 'NOT_FOUND', message: 'Route not found' } }));
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
const server = http.createServer(app);
|
|
81
|
-
|
|
82
|
-
server.on('upgrade', (req, socket, head) => {
|
|
83
|
-
const url = new URL(req.url, `http://${req.headers.host}`);
|
|
84
|
-
if (url.pathname !== '/agent-ws') {
|
|
85
|
-
socket.destroy();
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
wss.handleUpgrade(req, socket, head, (ws) => wss.emit('connection', ws, req));
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
// Only listen if run directly (not imported for testing)
|
|
92
|
-
if (require.main === module) {
|
|
93
|
-
startServer();
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function startServer() {
|
|
97
|
-
console.log(`Pulse hub v${config.APP_VERSION} starting`);
|
|
98
|
-
for (const line of formatFindings(checkConfig(process.env))) console.warn(line);
|
|
99
|
-
server.listen(config.PORT, config.HOST, () =>
|
|
100
|
-
console.log(`Pulse hub running on ${config.HOST}:${config.PORT}`),
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
module.exports = app;
|
|
105
|
-
// For backend/cli.js `start`, which requires this file instead of running it directly.
|
|
106
|
-
module.exports.startServer = startServer;
|
|
1
|
+
// Loaded first, before config.js (or anything else) reads process.env at require-time —
|
|
2
|
+
// dotenv only fills in vars that aren't already set, so this is a no-op (and harmless)
|
|
3
|
+
// on a box where PULSE_GOOGLE_*/PULSE_PUBLIC_URL are set some other way (systemd
|
|
4
|
+
// Environment=, a container's env, etc.) rather than via backend/.env. See
|
|
5
|
+
// backend/.env.example. The file's location is backend/.env unless PULSE_ENV_FILE says
|
|
6
|
+
// otherwise (the npm-installed hub uses /etc/pulse-hub/hub.env) — see lib/paths.js.
|
|
7
|
+
require('dotenv').config({ path: require('./lib/paths').ENV_FILE });
|
|
8
|
+
|
|
9
|
+
const http = require('http');
|
|
10
|
+
const express = require('express');
|
|
11
|
+
const config = require('./config');
|
|
12
|
+
|
|
13
|
+
const sessionGate = require('./middleware/session-gate');
|
|
14
|
+
const { requestId, attachAuthz } = require('./middleware/authz');
|
|
15
|
+
|
|
16
|
+
const authRoutes = require('./routes/auth');
|
|
17
|
+
const invitesPublicRoutes = require('./routes/invites-public');
|
|
18
|
+
const staticRoutes = require('./routes/static');
|
|
19
|
+
const usersRoutes = require('./routes/users');
|
|
20
|
+
const invitesRoutes = require('./routes/invites');
|
|
21
|
+
const teamsRoutes = require('./routes/teams');
|
|
22
|
+
const policiesRoutes = require('./routes/policies');
|
|
23
|
+
const accessRoutes = require('./routes/access');
|
|
24
|
+
const auditRoutes = require('./routes/audit');
|
|
25
|
+
const instancesRoutes = require('./routes/instances');
|
|
26
|
+
const metricsRoutes = require('./routes/metrics');
|
|
27
|
+
const logsRoutes = require('./routes/logs');
|
|
28
|
+
const envFilesRoutes = require('./routes/env-files');
|
|
29
|
+
|
|
30
|
+
const audit = require('./lib/audit');
|
|
31
|
+
const { checkConfig, formatFindings } = require('./lib/config-check');
|
|
32
|
+
const wss = require('./ws/agent-relay');
|
|
33
|
+
|
|
34
|
+
// Audit retention (PULSE_AUDIT_RETENTION_DAYS, default 180): prune once at boot, then hourly.
|
|
35
|
+
audit.prune();
|
|
36
|
+
setInterval(() => audit.prune(), 60 * 60 * 1000).unref();
|
|
37
|
+
|
|
38
|
+
const app = express();
|
|
39
|
+
|
|
40
|
+
// Trust proxy (nginx on 127.0.0.1) for IP address in audit logs
|
|
41
|
+
app.set('trust proxy', 'loopback');
|
|
42
|
+
|
|
43
|
+
// Request ID and auth middleware (run first)
|
|
44
|
+
app.use(requestId);
|
|
45
|
+
|
|
46
|
+
// ---- Public routes: no session required, matched before the session gate below ----
|
|
47
|
+
|
|
48
|
+
// Liveness + "which build is answering" for `pulse-hub setup`/`upgrade`/`doctor`, which
|
|
49
|
+
// poll it after a restart to confirm the NEW version is the one serving. Deliberately
|
|
50
|
+
// tiny: no auth state, no config, just the semver already shown in the UI.
|
|
51
|
+
app.get('/healthz', (req, res) => {
|
|
52
|
+
res.json({ ok: true, version: config.APP_VERSION });
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
app.use(authRoutes);
|
|
56
|
+
app.use(invitesPublicRoutes);
|
|
57
|
+
app.use(staticRoutes);
|
|
58
|
+
|
|
59
|
+
// ---- Everything past here requires a session (or, for a STATIC_FILES page path,
|
|
60
|
+
// redirects to login) — see middleware/session-gate.js ----
|
|
61
|
+
app.use(sessionGate);
|
|
62
|
+
app.use(attachAuthz);
|
|
63
|
+
|
|
64
|
+
app.use(usersRoutes);
|
|
65
|
+
app.use(invitesRoutes);
|
|
66
|
+
app.use(teamsRoutes);
|
|
67
|
+
app.use(policiesRoutes);
|
|
68
|
+
app.use(accessRoutes);
|
|
69
|
+
app.use(auditRoutes);
|
|
70
|
+
app.use(instancesRoutes);
|
|
71
|
+
app.use(metricsRoutes);
|
|
72
|
+
app.use(logsRoutes);
|
|
73
|
+
app.use(envFilesRoutes);
|
|
74
|
+
|
|
75
|
+
app.use((req, res) => {
|
|
76
|
+
res.writeHead(404);
|
|
77
|
+
res.end(JSON.stringify({ error: { code: 'NOT_FOUND', message: 'Route not found' } }));
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
const server = http.createServer(app);
|
|
81
|
+
|
|
82
|
+
server.on('upgrade', (req, socket, head) => {
|
|
83
|
+
const url = new URL(req.url, `http://${req.headers.host}`);
|
|
84
|
+
if (url.pathname !== '/agent-ws') {
|
|
85
|
+
socket.destroy();
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
wss.handleUpgrade(req, socket, head, (ws) => wss.emit('connection', ws, req));
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// Only listen if run directly (not imported for testing)
|
|
92
|
+
if (require.main === module) {
|
|
93
|
+
startServer();
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function startServer() {
|
|
97
|
+
console.log(`Pulse hub v${config.APP_VERSION} starting`);
|
|
98
|
+
for (const line of formatFindings(checkConfig(process.env))) console.warn(line);
|
|
99
|
+
server.listen(config.PORT, config.HOST, () =>
|
|
100
|
+
console.log(`Pulse hub running on ${config.HOST}:${config.PORT}`),
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
module.exports = app;
|
|
105
|
+
// For backend/cli.js `start`, which requires this file instead of running it directly.
|
|
106
|
+
module.exports.startServer = startServer;
|