Server render the main page
Also, add hashes to asset file names and use the "entry manifest" plugin in dev to get auto-reloading.
This commit is contained in:
@ -2,6 +2,7 @@ import { https } from 'firebase-functions';
|
||||
|
||||
// import serveAuth from './serveAuth';
|
||||
import serveAutoIndexPage from './serveAutoIndexPage';
|
||||
import serveMainPage from './serveMainPage';
|
||||
import serveNpmPackageFile from './serveNpmPackageFile';
|
||||
import servePublicKey from './servePublicKey';
|
||||
import serveStats from './serveStats';
|
||||
@ -9,6 +10,7 @@ import serveStats from './serveStats';
|
||||
export default {
|
||||
// serveAuth: https.onRequest(serveAuth),
|
||||
serveAutoIndexPage: https.onRequest(serveAutoIndexPage),
|
||||
serveMainPage: https.onRequest(serveMainPage),
|
||||
serveNpmPackageFile: https.onRequest(serveNpmPackageFile),
|
||||
servePublicKey: https.onRequest(servePublicKey),
|
||||
serveStats: https.onRequest(serveStats)
|
||||
|
||||
10
modules/functions/serveMainPage.js
Normal file
10
modules/functions/serveMainPage.js
Normal file
@ -0,0 +1,10 @@
|
||||
import express from 'express';
|
||||
|
||||
import serveMainPage from '../actions/serveMainPage';
|
||||
|
||||
const app = express();
|
||||
|
||||
app.disable('x-powered-by');
|
||||
app.use(serveMainPage);
|
||||
|
||||
export default app;
|
||||
Reference in New Issue
Block a user