mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-27 00:51:16 +01:00
try require from root
This commit is contained in:
@@ -230,18 +230,17 @@ function listen(callback) {
|
||||
winston.info('Using ports 80 and 443 is not recommend; use a proxy instead. See README.md');
|
||||
}
|
||||
|
||||
|
||||
var args = isSocket ? [socketPath] : [port, nconf.get('bind_address')];
|
||||
var bind_address = ((nconf.get('bind_address') === "0.0.0.0" || !nconf.get('bind_address')) ? '0.0.0.0' : nconf.get('bind_address')) + ':' + port;
|
||||
var bind_address = ((nconf.get('bind_address') === "0.0.0.0" || !nconf.get('bind_address')) ? '0.0.0.0' : nconf.get('bind_address'));
|
||||
var args = isSocket ? [socketPath] : [port, bind_address];
|
||||
var oldUmask;
|
||||
|
||||
args.push(function (err) {
|
||||
if (err) {
|
||||
winston.info('[startup] NodeBB was unable to listen on: ' + bind_address);
|
||||
winston.info('[startup] NodeBB was unable to listen on: ' + bind_address + ':' + port);
|
||||
process.exit();
|
||||
}
|
||||
|
||||
winston.info('NodeBB is now listening on: ' + (isSocket ? socketPath : bind_address));
|
||||
winston.info('NodeBB is now listening on: ' + (isSocket ? socketPath : bind_address + ':' + port));
|
||||
if (oldUmask) {
|
||||
process.umask(oldUmask);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,17 @@ var db = require('./mocks/databasemock');
|
||||
describe('authentication', function () {
|
||||
var jar = request.jar();
|
||||
|
||||
before(function(done) {
|
||||
request({
|
||||
url: nconf.get('url') + '/api/config',
|
||||
json: true,
|
||||
jar: jar
|
||||
}, function (err, response, body) {
|
||||
console.log('lel', body);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should register and login a user', function (done) {
|
||||
request({
|
||||
url: nconf.get('url') + '/api/config',
|
||||
|
||||
@@ -4,7 +4,12 @@
|
||||
var xhrPath = '../../node_modules/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest-ssl';
|
||||
|
||||
// Make initial call to require so module is cached.
|
||||
require(xhrPath);
|
||||
try {
|
||||
require(xhrPath);
|
||||
} catch(e) {
|
||||
require('xmlhttprequest-ssl');
|
||||
}
|
||||
|
||||
|
||||
var name = require.resolve(xhrPath);
|
||||
// Get cached version.
|
||||
|
||||
Reference in New Issue
Block a user