Update start command to support node 17+ and add another way to run the server locally through serve.

This commit is contained in:
colossatr0n 2023-01-28 19:29:20 -07:00
parent ffba917aae
commit 92db282896
3 changed files with 9 additions and 1 deletions

1
.gitignore vendored
View File

@ -17,6 +17,7 @@
.env.development.local
.env.test.local
.env.production.local
*~
npm-debug.log*
yarn-debug.log*

View File

@ -18,6 +18,12 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br />
You will also see any lint errors in the console.
If you receive `ERR_CONNECTION_REFUSED` in the console, see the [serve command](#npm-run-serve)
### `npm run serve`
This is an alternative way to run the server locally if you were previously getting `ERR_CONNECTION_REFUSED` in the console. Before running this command, install `serve` with `npm install serve`.
### `npm run build`
Builds the app for production to the `build` folder.<br />

View File

@ -29,7 +29,8 @@
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
"start": "react-scripts --openssl-legacy-provider start",
"start": "react-scripts --openssl-legacy-provider start || react-scripts start --openssl-legacy-provider",
"serve": "serve -s build",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"