@celsian/adapter-railway
v0.6.3
Published
CelsianJS adapter for Railway: generates Procfile, Dockerfile, and health check config
Maintainers
Readme
CelsianJS Railway Adapter
Generate Railway deployment files for CelsianJS apps. This is a build-time deploy adapter, not an HTTP handler.
Part of the CelsianJS monorepo. See the root README for full framework docs.
Installation
npm install @celsian/adapter-railwayUsage
The adapter is a plain object with a buildEnd() method that writes the files.
Call it from a post-build script:
// scripts/generate-railway-config.ts
import { railwayAdapter } from '@celsian/adapter-railway';
const adapter = railwayAdapter({ healthCheckPath: '/health' });
await adapter.buildEnd({
serverEntry: 'dist/index.js',
clientDir: 'dist/client',
staticDir: 'public',
outDir: '.',
});node --experimental-strip-types scripts/generate-railway-config.tsThat writes Procfile, railway.json and .env.example into outDir. Because
Railway runs a long-lived server, app.task() workers and app.cron()
schedulers run normally here. Make sure the server binds 0.0.0.0 (the default
in production) so Railway's proxy can reach it.
This adapter is not wired into
celsian.config.ts.CelsianConfighas nobuild.adapterkey, so thedefineConfig({ build: { adapter } })form this README used to show did not type-check and was never read bycelsian build.
License
MIT
