Quantcast
Channel: Is starting express like this "const app = require('express')()" considered bad practice? - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Is starting express like this "const app = require('express')()" considered bad practice?

$
0
0

So title says it all. Never seen anyone use this syntax.

const app = require('express')()

I like to keep the main js file lean and have everything in modules so all I have there is 15 lines including comments.

Google didn't help and haven't found an answer here.

Is it bad practice to invoke express as you require it?


Viewing all articles
Browse latest Browse all 5

Trending Articles





<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>