Skip to content
Myr

Merge pull request #1127 from benatkin/template-port-from-env

Before adoption: this commit came in with the history the project adopted, so no landing records it.

get port from env in template (fix for #1118)

authored by TJ Holowaychuk · committed by TJ Holowaychuk · parents 8235af4, 5f65c36 · Browse files · 1 file+4 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−3 removed

  • other:+4 added−3 removed

1 file+4 added−3 removed

modified:bin/express+4 added-3 removed
179 unmodified lines
180 , ''181 , 'var app = express();'182 , ''183 , 'app.configure(function(){'184 , ' app.set(\'port\', process.env.PORT || 3000);'185 , ' app.set(\'views\', __dirname + \'/views\');'186 , ' app.set(\'view engine\', \':TEMPLATE\');'187 , ' app.use(express.favicon());'188 , ' app.use(express.logger(\'dev\'));{css}'
8 unmodified lines
197 , '});'198 , ''199 , 'app.get(\'/\', routes.index);'200 , ''200 , 'http.createServer(app).listen(3000);'201 , 'http.createServer(app).listen(app.get(\'port\'), function() {'202 , ' console.log("Express server listening on port " + app.get(\'port\'));'203 , '});'204 , ''202 , 'console.log("Express server listening on port 3000");'203 , ''205].join(eol);206207// Generate application208
173 unmodified lines