grunt-express-server icon indicating copy to clipboard operation
grunt-express-server copied to clipboard

Specifying a port is ignored

Open mindvox opened this issue 9 years ago • 1 comments

When I specify a port e.g.

express: {
    options: {
        script: './app.js',
        port: 8080
    },
    dev: {
        options: {}
    }
}

The port is ignored and grunt-express-server uses the port number from my application. Any clues?

mindvox avatar Aug 12 '15 17:08 mindvox

Does your app look for the port in the environment? It should contain a line somethng like:

var MY_PORT = process.env.PORT || 8000;

deg avatar Dec 17 '15 21:12 deg