mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Change server dev setup
- `npm start` only starts the applications and requires that `npm run build` is already run - `npm run dev-server` runs the build and starts the server with nodemon - update README
This commit is contained in:
parent
4c554fea50
commit
f6755882f1
2 changed files with 23 additions and 2 deletions
22
README.md
22
README.md
|
|
@ -4,12 +4,32 @@
|
|||
|
||||
## Getting started
|
||||
|
||||
Clone this repository and install dependencies:
|
||||
|
||||
yarn
|
||||
|
||||
## Development
|
||||
|
||||
To develop the application and to see changes live, start the frontend
|
||||
development server:
|
||||
|
||||
npm run dev
|
||||
|
||||
## Server
|
||||
## Development Server
|
||||
|
||||
To develop the server setup, run:
|
||||
|
||||
npm run dev-server
|
||||
|
||||
This runs the frontend production build and starts the Express.js
|
||||
server in `server/index.js` that renders the application routes in the
|
||||
server. The server is automatically restarted when there are changes
|
||||
in the `server/` directory.
|
||||
|
||||
Not that this server does **not** pick up changes in the frontend
|
||||
application code.
|
||||
|
||||
## Production Server
|
||||
|
||||
npm run build
|
||||
npm start
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
"build": "react-scripts build",
|
||||
"test": "react-scripts test --env=jsdom",
|
||||
"eject": "react-scripts eject",
|
||||
"start": "npm run build&&node server/index.js"
|
||||
"start": "node server/index.js",
|
||||
"dev-server": "npm run build&&nodemon --watch server server/index.js"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue