Top "Express" questions

Express is a minimal and flexible Node.

How can I set response header on express.js assets

I need to set CORS to be enabled on scripts served by express. How can I set the headers in …

javascript node.js express
How to specify HTTP error code?

I have tried: app.get('/', function(req, res, next) { var e = new Error('error message'); e.status = 400; next(…

node.js express http-status-codes
NodeJS / Express: what is "app.use"?

In the docs for the NodeJS express module, the example code has app.use(...). What is the use function and …

node.js express
Sending JWT token in the headers with Postman

I'm testing an implementation of JWT Token based security based off the following article. I have successfully received a token …

express jwt postman
pass JSON to HTTP POST Request

I'm trying to make a HTTP POST request to the google QPX Express API [1] using nodejs and request [2]. My code …

json node.js curl express node-request
What is NODE_ENV and how to use it in Express?

This is my the app, I'm currently running on production. var app = express(); app.set('views',settings.c.WEB_PATH + …

javascript node.js express
Call a "local" function within module.exports from another function in module.exports?

How do you call a function from within another function in a module.exports declaration? app.js var bla = require(…

node.js express
Node.js/Express.js App Only Works on Port 3000

I have a Node.js/Express.js app running on my server that only works on port 3000 and I'm trying …

javascript node.js configuration express port
How can I render inline JavaScript with Jade / Pug?

I'm trying to get JavaScript to render on my page using Jade (http://jade-lang.com/) My project is in NodeJS …

node.js express pug
Get hostname of current request in node.js Express

So, I may be missing something simple here, but I can't seem to find a way to get the hostname …

node.js express hostname