nodejs 运行在tomcat_Node.js可以在Tomcat服务器中运行吗?

From what I have read so far in this blog http://nowjs.com/ I need to install nodejs in the server machine for it to work. But, I am using a shared server and don't really have any authority to put something into the server machine.

Putting it into the container(tomcat) is however another thing which I mostly do.

Generally speaking, when we say server we mean tomcat or websphere or jboss.

But with nodejs if I am not wrong server means the real machine on which tomcat etc. runs.

So is there any way I can run the nodejs server inside tomcat server or am I thinking about it the wrong way ?

解决方案

Yes, you are thinking of it it the wrong way. The key feature of Nodejs is that it contains, amongst other things, a rather natty embedded HTTP server. Think Jetty. However it might be possible now or in the future to run JavaScript in tomcat.

I recommend going to http://nodejs.org/ and watching the video, it will surely clear the matter up for you.

Meanwhile I would recommend getting hosting which includes SSH access, and preferably root access. Root access will make installing node a whole load easier and allow you to run it on a commonly used port (avoid running node as root, use port mapping) . But you don't need a seperate web server to get started, you can install Node.js on windows, mac and linux.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值