A minimal Express.js API that you can deploy to Railway in a few clicks.
- Node.js 18+ and npm installed locally
- Railway account
npm install
npm run devVisit http://localhost:8080.
- Create a new Railway project and select Deploy from GitHub or Deploy from code.
- Push this repository to GitHub (or connect your local folder via Railway CLI).
- When Railway asks for the build command, use
npm install. - Set the start command to
npm start. - Railway will automatically supply
PORT, so no extra environment variables are required.
Once deployment finishes, your app will respond at the generated Railway domain.
GET /– Welcome message with doc linkGET /health– Simple health probePOST /echo– Returns the JSON payload you send