Close WebSocket, tasks server, and HTTP server before calling
process.exit(1) in the error handler.
Co-authored-by: ajnart <49837342+ajnart@users.noreply.github.com>
Aligns with Next.js custom server docs by using app.getUpgradeHandler()
to delegate non-WS upgrade requests (e.g. _next/webpack-hmr) to Next.js
instead of silently dropping them. Also adds server.once("error") handler.
Co-authored-by: ajnart <49837342+ajnart@users.noreply.github.com>
- Add tasks dependencies (fastify, cron-job-api, cron-jobs, etc.) to nextjs app
- Import and start tasks (JobManager, jobGroup, Fastify cron API) in server.ts
- Update root package.json start script to remove tasks.cjs
- Update scripts/run.sh to run single process
- Update Dockerfile to not copy tasks.cjs
- Disable tasks dev script (no-op)
Co-authored-by: ajnart <49837342+ajnart@users.noreply.github.com>
- Create apps/nextjs/server.ts custom server integrating WebSocket via ws
- Update nextjs scripts to use custom server for dev and start
- Update root start script to remove separate ws server process
- Update client tRPC URL to connect to port 3000 in dev
- Update nginx.conf to route /websockets to port 3000
- Update Dockerfile and run.sh for integrated server
- Disable standalone ws server dev script
- Add benchmark-memory.sh script
Co-authored-by: ajnart <49837342+ajnart@users.noreply.github.com>