I have this piece of code in a Node / Express application:
app.use "/static", express.directory("#{__dirname}/public") app.use "/static", express.static("#{__dirname}/public")
It compiles as follows:
app.use("/static", express.directory("" + __dirname + "/public")); app.use("/static", express["static"]("" + __dirname + "/public"));
As a curiosity, I wonder: why is the dot-note used for the first call and the brackets for the second call?
source share