Quantcast
Channel: Why we don't directly do "app = require('express')"? - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Your Chocomate for Why we don't directly do "app =...

If you meanapp = require('express')();Then it's bad practice of integrating/using express.Assume we are going to use express to create a simple api server with routing. so, basically the boilerplate...

View Article



Why we don't directly do "app = require('express')"?

Almost in all NodeJS application codes I see the following lines:express = require('express');app = express();And the question comes to my mind: why we don't directly do: app = require('express');

View Article
Browsing all 2 articles
Browse latest View live




Latest Images