Answer by Hector Correa for What does the second bracket in "var app =...
Thefourtheye answered your question, but here is a simplified example of what is happening. Start by creating a file x.js with one function as shown below.// x.jsexports.x = function() { return...
View ArticleAnswer by thefourtheye for What does the second bracket in "var app =...
When you sayrequire('express')it is this file, which gets executed and it exports createApplication function. You can check that, like thisconsole.log(require('express'));// { [Function:...
View ArticleWhat does the second bracket in "var app = require('express')()" do?
I'm quite new at the express framework.I looked up at the Socket.io website for a quick start and I saw this statement at "Using with the Express 3 web framework". And in this line of the code...
View Article
More Pages to Explore .....