Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can node.js be used as a framework for running arbitrary server-side Javascript in web applications?

Can node.js be used as a general framework for running server-side Javascript specifically for web applications, totally unrelated to it's non-blocking and asynchrouns I/O functionality? Specifically I want to know if I can run arbitrary Javascript on the (web) server without using the other node.js functionality.

like image 351
Howiecamp Avatar asked Dec 01 '25 08:12

Howiecamp


1 Answers

Yes, it's possible to use node.js for command-line applications, for example:

$ cat hello.js
console.log('Hello world!');
$ node hello.js
Hello world!

It's essentially just like any scripting language in this regard.

like image 164
Matthias Benkard Avatar answered Dec 03 '25 22:12

Matthias Benkard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!