Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/react-scripts/scripts/utils/frontierInit.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ function installFrontierDependencies(appPath, answers, ownPath) {
if (additionalFeatures.includes('polymer')) {
configurePolymer(appPath);
}
if (additionalFeatures.includes('electric-flow')) {
if (
additionalFeatures.includes('electric-flow') ||
additionalFeatures.includes('header-footer')
) {
configureEF(appPath, ownPath);
}
if (additionalFeatures.includes('header-footer')) {
Expand Down Expand Up @@ -143,6 +146,9 @@ function configureEF(appPath, ownPath) {
packageJson.scripts = sortScripts({ ...packageJson.scripts, ...additionalScripts });
return packageJson;
});

let modules = ['express'];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need express?

installModulesSync(modules, useYarn);
}

function configureHF(appPath, ownPath) {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/template-ef/Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: node src/server.js
web: node server.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
const path = require('path');
const express = require('express');
const app = express();

// Statically serve up the production built React App
app.use(express.static(`${__dirname}/build`));
app.use(express.static('build'));

const port = process.env.PORT || 3000;
app.listen(port, () => {
Expand Down