Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: express
node v11.15.0
version:
1.0.0
endpoint
share
tweet
const express = require('express') const app = express() app.get('/', function (req, res) { res.send('try /ninja') }) app.get('/ninja', function (req, res) { res.send('Hello Ninja!') }) app.get('/ninja/:ninjaId', function (req, res) { res.send(`Hello Ninja with id = ${req.params.ninjaId}!`) }) // Try to add this code before the `/ninja/:ninjaId` route app.get('/ninja/cats', function (req, res) { res.send('Hello Cat Ninja') }) app.listen(3000, function () { console.log('Example app listening on port 3000!') }) process.env.RUNKIT_ENDPOINT_URL
Created from: https://npm.runkit.com/express
Loading…
no comments
sign in
to comment