code 'function'
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
const express = require('express');
|
const express = require('express');
|
||||||
const app = express();
|
const app = express();
|
||||||
|
|
||||||
module.exports = function(/*config*/){
|
module.exports = (/*config*/) => {
|
||||||
app.get('/', (req,res) => {
|
app.get('/', (req,res) => {
|
||||||
res.status(200).send('Hello World!');
|
res.status(200).send('Hello World!');
|
||||||
});
|
});
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
const refConfig = require('./config.default.json');
|
const refConfig = require('./config.default.json');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
const merge = function (ref, src) {
|
const merge = (ref, src) => {
|
||||||
if (typeof ref !== typeof src) {
|
if (typeof ref !== typeof src) {
|
||||||
return ref;
|
return ref;
|
||||||
} else if (typeof ref === 'object') {
|
} else if (typeof ref === 'object') {
|
||||||
@@ -13,7 +13,7 @@ const merge = function (ref, src) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = function () {
|
module.exports = () => {
|
||||||
try {
|
try {
|
||||||
let configData = fs.readFileSync('./config.json');
|
let configData = fs.readFileSync('./config.json');
|
||||||
let config = JSON.parse(configData);
|
let config = JSON.parse(configData);
|
||||||
|
|||||||
Reference in New Issue
Block a user