bdefore / universal-redux

An npm package that lets you jump right into coding React and Redux with universal (isomorphic) rendering. Only manage Express setups or Webpack configurations if you want to.
MIT License
460 stars 48 forks source link

how running on production? #74

Closed sexyoung closed 8 years ago

sexyoung commented 8 years ago

sorry I have a stupid question... :disappointed:

I finish my website use universal-redux. if on my Mac, how to simulation production environment? now I already npm run build, and I don't know what is next step I should to do.... my env:

Thanks universal-redux Team! :+1:

bdefore commented 8 years ago

@sexyoung you could add the following to your package.json scripts: "server": "NODE_ENV=production NODE_PATH=./src universal-redux-server", and run `npm run server' locally to simulate production. i added this to the starter repo.

sexyoung commented 8 years ago

Thank you @bdefore , you've been such a great help. :sunny:

bdefore commented 8 years ago

happy to help :+1:

pavelkornev commented 8 years ago

@bdefore why all babel dependencies are in production dependencies section in package.json?

bdefore commented 8 years ago

@pavelkornev as i understand npm3 behavior, if universal-redux listed its dependencies in devDependencies, they would not be installed if universal-redux itself was a dependency of your project. this would mean each project would need to explicitly include webpack, loaders, et. al. in order to work with UR.