Skip to content

Commit

Permalink
Use express.static directly
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Aug 8, 2019
1 parent dfe2f29 commit 091e13b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
3 changes: 1 addition & 2 deletions modules/createServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import findEntry from './middleware/findEntry.js';
import noQuery from './middleware/noQuery.js';
import redirectLegacyURLs from './middleware/redirectLegacyURLs.js';
import requestLog from './middleware/requestLog.js';
import staticFiles from './middleware/staticFiles.js';
import validateFilename from './middleware/validateFilename.js';
import validatePackageURL from './middleware/validatePackageURL.js';
import validatePackageName from './middleware/validatePackageName.js';
Expand All @@ -39,7 +38,7 @@ export default function createServer() {
}

app.use(cors());
app.use(staticFiles);
app.use(express.static('public', { maxAge: '1y' }));

// Special startup request from App Engine
// https://cloud.google.com/appengine/docs/standard/nodejs/how-instances-are-managed
Expand Down
12 changes: 0 additions & 12 deletions modules/middleware/staticFiles.js

This file was deleted.

0 comments on commit 091e13b

Please sign in to comment.