title | description | tags | |||
---|---|---|---|---|---|
ExpressJS Postgres |
An ExpressJS server that connects to a PostgreSQL database |
|
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 link
- 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
.