Server
Last updated
Was this helpful?
Last updated
Was this helpful?
An easy way to get started with a Express server with PostgreSQL with Node.js.
Babel 7
Environment Variables
Express
REST API
PostgreSQL
git clone git@github.com:rwieruch/node-express-postgresql-server.git
cd node-express-postgresql-server
npm install
npm start
optional: include .env in your .gitignore
/messages
/messages/1
/users
/users/1
CURL
Create a message with:
curl -X POST -H "Content-Type:application/json" http://localhost:3000/messages -d '{"text":"Hi again, World"}'
Delete a message with:
curl -X DELETE -H "Content-Type:application/json" http://localhost:3000/messages/1
Postman
Create a message with:
Method: POST
Body: raw + JSON (application/json)
Body Content: { "text": "Hi again, World" }
Delete a message with:
Method: DELETE
visit
Install to interact with REST API
URL:
URL: