jcc-express-mvc 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jcc-express-mvc",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "express mvc structure",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -1,8 +1,7 @@
1
1
  const App = require("./app");
2
2
  const { authenticated, protectedApi } = require("./Auth/protectedRoute");
3
3
  const Auth = require("./Auth");
4
- const Template = require("./templating-engine");
5
-
4
+ const template = require("./templating-engine");
6
5
  const {
7
6
  bcrypt,
8
7
  getApiController,
@@ -40,5 +39,5 @@ module.exports = {
40
39
  apiAuthenticated: protectedApi,
41
40
  Auth,
42
41
  getDbCli,
43
- template: new Template(),
42
+ template,
44
43
  };
@@ -130,7 +130,6 @@ class Template {
130
130
  .replace(/(\{\{\-\-)/g, "<!--")
131
131
  .replace(/(\-\-\}\})/g, "-->");
132
132
  }
133
-
134
133
  render(filePath, locals, callback) {
135
134
  fs.readFile(filePath, "utf-8", (err, content) => {
136
135
  if (err) return callback(err);
@@ -140,4 +139,4 @@ class Template {
140
139
  }
141
140
  }
142
141
 
143
- module.exports = Template;
142
+ module.exports = new Template();