是否可以使用JavaScript编写后端? [英] Is it possible to write the backend using JavaScript?
问题描述
众所周知,JavaScript在网络上很普遍。对于客户端脚本,它做得很好。
As we all know, JavaScript is widespread on the web. For client side scripting it does a great job.
但是可以在浏览器之外使用JavaScript吗?例如,编写流式套接字或编写数据库,做日程工作?在后端这样的事情?谢谢。
But is it possible to take JavaScript outside the browser? For example, writing a streaming socket or writing DB, doing schedule job? Things like that in the backend? Thanks.
推荐答案
看看的node.js 。它确实做了很多事情,但可能不是最适合所有目的。
Have a look at node.js. It does a certain number of things very well, but may not be best suited for all purposes.
如果你想做的事情涉及很多并行进程和/或你想保持对用户浏览器的持久连接,那么它可能是完美。
If you are looking to do stuff that involves a lot of parallell processes and/or you want to keep persistent connections open to and from a user's browser, then it may be perfect.
这篇关于是否可以使用JavaScript编写后端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!