philnash / react-express-starter

A starter kit for React applications with a back end server all in the same project
MIT License
192 stars 88 forks source link

How would you deploy this to a server? #2

Open nz-chris opened 5 years ago

nz-chris commented 5 years ago

Especially wondering how deploying this to a server would work when webpack is involved? Can you 'build' this? If so, how? Sorry if my question is vague, I'm a beginner! Any help is much appreciated.

Thanks for your tutorial.

philnash commented 5 years ago

This is a good question and one I haven’t addressed and I should.

You can build the React front-end with the command npm run build. Currently the server side is not setup for production (the dependencies are in devDependencies) but you could adapt that.

Sorry for the short message though, I’m currently on holiday so away from my laptop.

nz-chris commented 5 years ago

Thanks for your reply.

Currently the server side is not setup for production (the dependencies are in devDependencies) but you could adapt that.

I will try and split out the server side into its own 'project' with its own package.json and see where I can get from there. My main concern is that I hope to maintain the convenience of the npm run dev script.

I'll update here when I get somewhere (or if I get stuck).

addempsea commented 4 years ago

Any luck deploying the app?

emorling commented 3 years ago

Any updates on this?

ajax22 commented 3 years ago

@nz-chris Any updates on this?