refactor: refactor the api folder & fix how the inconsistency between netlify & serverless-offline routes

This commit is contained in:
MTG2000
2022-06-08 23:43:42 +03:00
parent 0f14960aa5
commit 4780118e2e
34 changed files with 441 additions and 510 deletions

View File

@@ -0,0 +1,9 @@
const createGlobalModule = (name, factoryFn) => {
if (!global[name]) {
global[name] = factoryFn();
}
return global[name];
}
module.exports = createGlobalModule