@hackthedev/express-starter 1.0.4 → 1.0.5

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.
Files changed (2) hide show
  1. package/index.mjs +2 -9
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -109,25 +109,18 @@ export default class ExpressStarter {
109
109
  ["random", () => this.generateId(12)],
110
110
  ];
111
111
 
112
-
113
- // merge with custom ones
114
- if(getPlaceholders){
112
+ if (getPlaceholders) {
115
113
  let customPlaceholderArray = await getPlaceholders(req);
116
114
  placeholders = ArrayTools.merge(placeholders, customPlaceholderArray);
117
115
  }
118
116
 
119
- // merge with custom ones
120
- if(getExtensions){
121
- let customExtensionsArray = await getExtensions(req);
122
- templateExtensions = ArrayTools.merge(templateExtensions, customExtensionsArray);
123
- }
124
-
125
117
  return template.replace(/{{\s*([^{}\s]+)\s*}}/g, (match, key) => {
126
118
  const found = placeholders.find(([name]) => name === key);
127
119
  return found ? found[1]() : '';
128
120
  });
129
121
  }
130
122
 
123
+
131
124
  this.app.use(async (req, res, next) => {
132
125
  let reqPath = req.path === '/' ? '/index.html' : req.path;
133
126
  const ext = path.extname(reqPath).toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hackthedev/express-starter",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "This library's purpose is to get rid of the default structure you usually need and create when trying to get an express server up and running in NodeJS. It works so well in fact that you can get a server up and running with only a few lines of code, as many default variables will handle the most basic setup.",
5
5
  "homepage": "https://github.com/NETWORK-Z-Dev/ExpressStarter#readme",
6
6
  "bugs": {