Sign in
Log inSign up

Newbie question about NodeJs/ReactJS deployment

xahovuzu's photo
xahovuzu
·Aug 22, 2018

I'm starting to work with ReactJs, I'm reading a book and also watching videos and reading tutorials. I'm from a PHP background and even though I'm kinda good already with JavaScript, enough to feel comfortable to learn ReactJs, I learned a lot of things already, the only part that I don't get yet is the deployment part using NodeJs. In PHP we only develop the entire application in PHP and then we will have one server that will serve the files and that is it, in NodeJs we usually have two servers, one for the client side and another one for the back end that will serve the API. I was wondering how the final server works, will I need two servers or the same server will serve both the static files and the API? I tried to search and find tutorials on the internet and most of them is using the client and backend server separated for development and they don't mention how it will work on production. I also tried to find some MERN stack boilerplate or repositorie on Github but they are mostly isomorphic/serve side rendering (which I have no idea if it's the best alternative than client side rendering). What are your thoughts, how does usually a production server works?

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct