mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-24 01:10:31 +01:00
refactor: add server side helpers.js
This commit is contained in:
7
src/helpers.js
Normal file
7
src/helpers.js
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../public/src/modules/helpers.common')(
|
||||
require('./utils'),
|
||||
require('benchpressjs'),
|
||||
require('nconf').get('relative_path'),
|
||||
);
|
||||
@@ -34,7 +34,7 @@ const topicEvents = require('./topics/events');
|
||||
const routes = require('./routes');
|
||||
const auth = require('./routes/authentication');
|
||||
|
||||
const helpers = require('../public/src/modules/helpers.common')(require('./utils'), Benchpress, nconf.get('relative_path'));
|
||||
const helpers = require('./helpers');
|
||||
|
||||
if (nconf.get('ssl')) {
|
||||
server = require('https').createServer({
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
|
||||
const nconf = require('nconf');
|
||||
const assert = require('assert');
|
||||
const benchpress = require('benchpressjs');
|
||||
|
||||
const db = require('./mocks/databasemock');
|
||||
const helpers = require('../public/src/modules/helpers.common')(require('../src/utils'), benchpress, nconf.get('relative_path'));
|
||||
const helpers = require('../src/helpers');
|
||||
|
||||
describe('helpers', () => {
|
||||
it('should return false if item doesn\'t exist', (done) => {
|
||||
|
||||
Reference in New Issue
Block a user