Sorry, I am new to express. I have following doubt.
Suppose, I missed specifying callback with express().get('/v1/message-get',) method, then it is treated as normal get method (Returns the value of '/v1/message-get' app setting)
or It should be a route path (Routes HTTP GET requests to the specified path '/v1/message-get')?
For example,
test.js**********
var express = require('express');
var app = express();
// in this case, I did not provide callback
// function after comma (assume, I missed it somehow)
app.get('/v1/message-get',);
// this one having a callback
app.get('/v2/message', function(req, res){
console.log('Call back present');
});
module.exports = app;
'/v2/message' is a valid route but, what about '/v1/message-get'. I know, it is not valid route (as callback function is not provided), but I am not getting any console error on starting node server. is it because app.get('/v1/message-get',) treated as getting app setting for value '/v1/message-get'
Ref: http://expressjs.com/en/api.html#app.get
Thanks