简体   繁体   中英

Is Node Js is server or server side scripting language

I have some confusion that nodejs is act as server and scripting language. It is true that nodejs will be acting as server like apache and nginx and also server side scripting language like php?

Yes and yes.

There is several frameworks, such as Express , that allows you to create a web-server. You can even do it with the standard http module .

And it is javascript, you can code some logic.

Node.js is a JavaScript runtime outside of web browser, enhanced with various libraries to allow more than a typical JavaScript engine in a web browser allows you to do.

Yes, you can create a web server using Node.js, but not only that. You can create console applications, or even typical desktop applications , complete with OS integration!

In my mind nodejs doesn't act like a server like apache or nginx or any other one.

It wraps these functionnalities around frameworks. Express is a framework that acts like a webserver, running on a specific port that can be an alternative to apache, ninx, iis etc...

You can run anything on nodejs, if it's javascript, mail server, push notification server, web server, amqp middleware etc...

NodeJs is only a platform that allows running javascript on a machine, on a server. Nothing else.

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