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