Skip to content

Instantly share code, notes, and snippets.

@arashmad
Last active January 2, 2021 06:54
Show Gist options
  • Save arashmad/40fb2cddf04a4e7e24271f9bc7d742f4 to your computer and use it in GitHub Desktop.
Save arashmad/40fb2cddf04a4e7e24271f9bc7d742f4 to your computer and use it in GitHub Desktop.
Buid React/Node/Express with Yarn
// add
app.use(express.static(path.join(__dirname, "..", "build")));
// change
"start": "react-scripts start"
// to
"start-client": "react-scripts start"
// then, add
"start": "yarn run build && (cd server && yarn start)"
@arashmad
Copy link
Author

arashmad commented Jan 2, 2021

Run yarn start command to build and run project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment