如何在Web服务(服务器端)中使用javascript [英] How do I use javascript in a Web Service (server side)

查看:135
本文介绍了如何在Web服务(服务器端)中使用javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(使用VS 10)



我如何/可以在Web服务(服务器端)中使用javascript。我对Web服务非常陌生,并且能够让他们连接到数据库等。



我所拥有的是一个执行所有工作的特定JavaScript库。



我在网上找到的所有内容都讲述了如何使用javascript调用web服务,没有关于在服务中使用它的信息。



谢谢

(Working with VS 10)

How do I/can I use javascript in a Web Service (server side). I am VERY new to web services and have been able to get them to connect to databases and such.

What I have is a specific javascript library that performs all the work.

Everything that I can find on the net talks about how to CALL a webservice with javascript, with no info about using it in the service itself.

Thanks

推荐答案

实际上,你的问题很有意义。您可以在服务器端使用node.js(这是一个很棒的包),并在服务器上运行纯JavaScript。我一直在做很多事情,我对它印象深刻。



如果你使用node.js,那么你想调查使用Restify创建RESTful Web服务。
Actually, your question makes a lot of sense. You could use node.js at the server side (it's a great package) and have pure JavaScript running at the server. I've been doing a fair bit with it and I am seriously impressed with it.

If you use node.js, then you want to investigate using Restify to create RESTful web services.


您不能在 Web服务中使用 JavaScript 。为外部资源创建 Web服务,以便在其站点上使用它们。因此,您必须调用 Web服务的功能才能执行任何操作。



为什么需要使用 Web服务中的JavaScript ?我猜你有些困惑。
You can't use JavaScript inside the Web Service. Web Services are created for external resources in order consume them at their site. So, you have to call the function of Web Service in order to perform any operation.

Why would you need to use JavaScript inside Web Service? I guess you have some confusion.


这篇关于如何在Web服务(服务器端)中使用javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆