Node host
server.js calls app.listen(xyzEnv.PORT) whenever VERCEL is unset, so the same entry point runs as a long-lived server.[1] The repository has no Dockerfile; containerising it follows the same steps.[2]
A checkout of main or a release tag carries the MAPP bundles. On another branch, build them first with a full pnpm install; the Vite build tools are dev dependencies, which --prod does not install. See release builds.
bash
pnpm install --prod
pnpm exec varlock run -- node apps/xyz/server.js # with Varlock
node apps/xyz/server.js # environment from the host- Under
varlock run,.envand.env.schemaresolve at process start, sogsm()references need credentials on the host, and a restart picks up new secret versions. See Vercel environment. PORTdefaults to3000. Put a TLS-terminating proxy in front; the default cookies areSecure.- Set
XYZ_CWDwhen the working directory is not the repository root, soresources,*.pemandfile:workspace references resolve. - A normal install builds the native
bcryptmodule, which password login needs;--ignore-scriptsskips it. - The same smoke routes apply as on Vercel.
One XYZ instance for login
When one instance, eg. an admin instance, handles login for others:
COOKIE_PROPS. Instances on subdomains (admin.example.com,mapp.example.com) needDomain=.example.com, eg.COOKIE_PROPS="Secure; HttpOnly; SameSite=Strict; Domain=.example.com; Path=/". Instances on paths of one domain (example.com/admin,example.com/demo) need no change; the default omitsDomainand derivesPathfromDIR.[3]TRUSTED_RETURN_HOSTS. Only the subdomain layout needs it, since itsreturn_tois an absolute URL, eg.TRUSTED_RETURN_HOSTS=https://admin.example.com. Unset, no absolutereturn_tois accepted. See TRUSTED_RETURN_HOSTS.JWT_ISSUERandJWT_AUDIENCE. Theissandaudclaims of the session token, bothxyzby default. See session token claims.