INNER CODE UNIT · JavaScript

listenAndMaybeInstall

phusion/passenger · src/helper-scripts/node-loader.js:349

function listenAndMaybeInstall(port) {
	if (port === 'passenger' || port == '/passenger') {
		if (!PhusionPassenger._appInstalled) {
			return installServer.apply(this, arguments);
		} else {
			throw new Error("You may only call listen('passenger') once. Please read http://stackoverflow.com/questions/20645231/phusion-passenger-error-http-server-listen-was-called-more-than-once/20645549");
		}
	} else {
		return this.originalListen.apply(this, arguments);
	}
}

function finalizeStartup() {
	recordJourneyStepEnd('SUBPROCESS_LISTEN', 'STEP_PERFORMED');

	var workDir = process.env['PASSENGER_SPAWN_WORK_DIR'];

	fs.writeFileSync(workDir + '/response/properties.json', JSON.stringify({

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…