RunKit + npm: express

node v11.15.0
version: 1.0.0
endpointsharetweet
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