Thursday, 11 May 2017

What is the function of router(app) do in the following code?

Here are few lines of code.I did not understand their function.I have commented in the code the lines that I have not understood.

 var express = require('express');
 var app = express();
 var router = require('./api/router'); //not understood
 router(app); //not understood

It will be helpful I anyone can explain their function.



via Aditya Jain

No comments:

Post a Comment