Skip to content

Commit

Permalink
Merge pull request #8 from pavlikm/v1.0.8
Browse files Browse the repository at this point in the history
removed duplicate read of file
  • Loading branch information
pavlikm authored May 3, 2021
2 parents d4f0633 + 70cc43b commit c5200bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ function stash(req, res, next) {
routeInitialized = true;
res.app.get("/"+scriptUrl, (req, res) => {
res.set('Cache-control', 'public, max-age=3600');
var html = fs.readFileSync(__dirname + '/browser/cache-html-part.min.js', 'utf8');
res.write(html);
res.write(script);
res.end();
})
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cache-html-part",
"version": "1.0.7",
"version": "1.0.8",
"description": "cache static parts of web page in browser",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit c5200bb

Please sign in to comment.