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 +1 -1
- package/src/index.js +2 -3
- package/src/templating-engine/index.js +1 -2
package/package.json
CHANGED
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
|
|
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
|
|
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();
|