Comments (2)
npm install you only do once to install the dependencies of the project. You can see the dependencies in package.json. This file also contains all the info you need about the various commands.
npm run build command cleans and builds a new development version of the project into your public/dist folder.
npm run start command starts the development server with the development version you just built.
npm run:production command cleans and builds a new production version of the project into your public/dist folder and starts the production server with the production version you just built.
If you want to deploy your project to a production server you need to copy the whole built project to your production node server, not just the dist folder.
from react-cool-starter.
As @jazblueful mentioned, npm install
is for installing the dependencies which the project needed, so you just need to do it once. This is an universal rendering starter, so you need to put the project on your host which supports node.js.
By the way, the index.html
is generated through the run time of express server. You can configure it through the ./src/helper/renderHTMLPage.js
file.
Moreover, you don't have to clean the dist file by yourself, whenever you run the npm run build
or npm run start:production
the npm scripts will clean the dist folder for you :)
from react-cool-starter.
Related Issues (20)
- Is it possible to have cache for some request from node side? HOT 1
- Do we have server built file? HOT 3
- Cannot find module '~/node_modules/babel-loader/lib/index.js' when run build! HOT 5
- How you deal with react-refresh? HOT 13
- Internationalization BuiltIn (react-i18n-next)
- Release to npm as a template for CRA
- Not loading images on fresh open HOT 1
- Migration to React 18 HOT 1
- Update git ignore file
- Having lighter bundle alongside catching libraries in separated bundle file(s). HOT 7
- What is hook.js and what is its benefits? HOT 15
- Page Getting Refresh When I Navigate from Home to User (Router Issue) HOT 2
- Is it possible to have more readable package.json file? HOT 10
- how to deploy node js application using pm2 config HOT 2
- Having faster development area for babel. HOT 2
- Client side loading doesn't work HOT 2
- Error: pngquant failed to build, make sure that libpng-dev is installed HOT 1
- css lib is not working - semantic ui HOT 3
- React-refresh throws error when use .js extension for page component HOT 1
- Cannot load images with more than 10Kb HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-cool-starter.