Last active
January 2, 2021 06:54
-
-
Save arashmad/40fb2cddf04a4e7e24271f9bc7d742f4 to your computer and use it in GitHub Desktop.
Buid React/Node/Express with Yarn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add | |
app.use(express.static(path.join(__dirname, "..", "build"))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// change | |
"start": "react-scripts start" | |
// to | |
"start-client": "react-scripts start" | |
// then, add | |
"start": "yarn run build && (cd server && yarn start)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run
yarn start
command to build and run project.