简体   繁体   中英

What's the difference between a web server and a development server?

So a bit of context - I'm trying to give my create-react-app project a backend using express.

I'm following a tutorial that talks about having two servers working concurrently. This leaves me a bit confused - what's the difference between a web and a dev server , and how you can have two servers working simultaneously?

I think the underlying issue here is that I only have a shallow understanding of what a server actually is: I only understand it as being a process that listens to requests and sends responses.

Cheers

The tutorial most likely refers to the following definitions:

  • development server

    • available at localhost
    • runs on your local machine, ie your PC
    • intended for local development and testing
  • web server

    • available at an IP adress or domain
    • runs on a remote server like a cloud server such as Google Cloud / Heroku / Digital Ocean
    • intended for production for your real users

From what I understand of your question, this tutorial seems to be talking about 2 separate environments, a production environment (ie where the 'real' code that clients/users will use runs), and a development environment (ie where code that is currently under testing and not ready for the 'real world' runs).

The reason you want (at least) 2 of them is so you can deploy your code to the dev environment and then test it out, see if it works, how it works, and if it breaks anything, without risking the real server going out, or maybe accidentally wiping your real customer database or something like that. When you deploy to your dev environment and see that everything work as it should and nothing is broken, then you can put that version of the code to run in your real, production environment, and be pretty sure your backend is not gonna go out while you are developing

I may be misunderstanding what the article is saying, but from your description I think that is it

Hope that helps you!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM