java-tutorials/spring-cloud-modules/spring-cloud-netflix-sidecar/sidecar-demo/nodejs/hello.js

19 lines
377 B
JavaScript
Raw Normal View History

const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => {
res.send('Hello World!')
})
app.get('/health', (req, res) => {
res.send({ "status":"UP"})
})
app.get('/hello/:me', (req, res) => {
res.send('Hello ' + req.params.me + '!')
})
app.listen(port, () => {
console.log(`Hello app listening on port ${port}`)
})