|
|
|
|
@ -84,6 +84,13 @@ app.get('/metrics2', function(req, res){
|
|
|
|
|
res.end(); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
app.use(express.json()); |
|
|
|
|
|
|
|
|
|
app.post('/token', function(request, response){ |
|
|
|
|
console.log(request.body); // your JSON
|
|
|
|
|
response.send(request.body); // echo the result back
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
app.get('/', (req, res)=>{ |
|
|
|
|
res.json([{message:'yes, your nodejs app is really running'}]); |
|
|
|
|
counter++; // for prometheus invocation_count metric
|
|
|
|
|
@ -109,7 +116,9 @@ app.post('/info/add/:name', function(req, res){
|
|
|
|
|
res.send('color ' + req.params.name + ' added to database'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// app.get('/token/:user&:password', function(req, res){
|
|
|
|
|
// res.json(req.params);
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
connectWithRetry(); |
|
|
|
|
|
|
|
|
|
|