Runkit
Runkit
home page
user forum
new notebook
support & documentation
log in
sign up
new notebook
documentation & support
Sign In
Sign Up
noderat's notebooks
Example Rest API
-
/noderat/example-rest-api
Last edited 3 years ago
- from:
https://expressjs.com/en/starter/hello-world.html
const express = require('express') const app = express() const port = 3000 app.get('/', (req, res) => { res.send({ example: "payload" }) }) app.listen(port, () => { console.log(`Example app listening at http://localhost:${port}`) })