This example starts an ExpressJS server that connects to a Railway PostgreSQL database.
- Postgres
- Express
- TypeScript
- Install dependencies
yarn
- Create a Railway project with the Postgres plugin
- Connect to your Railway project
railway init
- Start the server
railway run yarn dev
The server started simply returns the current time in the database. The SQL
query is located in src/index.js
.