dvdzkwsk / react-redux-starter-kit

Get started with React, Redux, and React-Router.
MIT License
10.29k stars 2.2k forks source link

Uploading to Staging Server #1276

Closed vyerneni17 closed 7 years ago

vyerneni17 commented 7 years ago

I have adapted my project from this starter kit. I need help with something, din't know how to ask it other than submitting an issue.

I have pretty much the same webpack.config and project.config. I have only added some new components, routes to the starter-kit for my needs. Everything works great in development env. Now, I'm trying to upload it to staging environment. I had generated the dist/ folder using npm run build.

Now, I'm uploading the dist/ folder to my staging server. I have a script that installs node modules automatically and then starts the server when I run npm start. Here is the command to start the server, cross-env NODE_ENV=development node build/scripts/start inside my script. When I upload this script to staging and run it, it is complaining that it cannot find the module build/scripts/start. Fair enough, because there is no build dir on the staging server.

How do I fix this, should I manually add the build/ folder to staging ? My understanding is that dist/ should have all the bundled files and it does everything without us adding any other directory to the server.

So, how do I accomplish this without adding the build/ to server ? Any suggestions to better implement it also helps, Thanks!