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

19 lines
377 B
JavaScript

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}`)
})