code 'function'

This commit is contained in:
Clément GOUIN
2019-06-19 16:28:53 +02:00
parent 20b4d0353f
commit f17bcbd3c9
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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
View File
@@ -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);