Q:

Automatic request call from nodejs server

I just wanna know how I can call an existing API from my node server file. 
I know I can use "request" or some other modules like that but I wanna know first if we can call an internal API without external module. 
For example, I have this endpoint on a child module :
app.get('/alerts/get', function(req, res, next) {
  getAlerts(res);
});

I want to know if, on his parent, I can call "/alerts/get" automatically once I launch the app. 
// Start app
app.listen(port);
// API call here ? 

I hope i'm clear, sorry if I made typo. 

A:

Put the common code in a function and then call that function from more than one place, from both the request and from your startup code. 
If you want to execute an entire http request to yourself, then you would issue an http request to your own local IP address.   The request module makes that simpler, but you can use http.request() if you don't want to load another module for some reason.   The http module is already being used by Express so it's already in memory. 
var http = require('http');
http.request(...);

See the doc for more info.