Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (s[fn]) {
return s[fn];
};
}
return originalReadFileSync(file, options);
};
// replace standard readFileSync with our caching version
fs.readFileSync = cachedReadFileSync;
// if iisnode is being used, it defines the port we need to use in an environment
// variable; if this variable is defined, we override the config with it otherwise
// the web app won't work correctly
if (process.env.PORT) {
// we do the require in-place here to ensure it comes from the cache
require('ghost/core/server/config').set('server:port', process.env.PORT);
}
// on Windows, Ctrl-C (SIGINT) won't be recognised unless we go via readline
if (process.platform === 'win32') {
var rl = require('readline').createInterface({
input: process.stdin,
output: process.stdout
});
rl.on('SIGINT', function () {
process.emit('SIGINT');
});
}
//
// content of ghost\index.js
if (s[fn]) {
return s[fn];
};
}
return originalReadFileSync(file, options);
};
// replace standard readFileSync with our caching version
fs.readFileSync = cachedReadFileSync;
// if iisnode is being used, it defines the port we need to use in an environment
// variable; if this variable is defined, we override the config with it otherwise
// the web app won't work correctly
if (process.env.PORT) {
// we do the require in-place here to ensure it comes from the cache
require('ghost/core/server/config').set('server:port', process.env.PORT);
}
// on Windows, Ctrl-C (SIGINT) won't be recognised unless we go via readline
if (process.platform === 'win32') {
var rl = require('readline').createInterface({
input: process.stdin,
output: process.stdout
});
rl.on('SIGINT', function () {
process.emit('SIGINT');
});
}