JavaScript 通讯框架 NowJS

码农软件 · 软件分类 · Node.js 扩展 · 2019-04-17 13:28:08

软件介绍

NowJS 是一个实现了 JavaScript 服务器端进行通讯的框架,基于 Node.js 开发。

示例代码:

服务器端:

<script src="/nowjs/now.js"></script>
var everyone = require("now").initialize(httpServer); everyone.now.getServerInfo = function(callback){ db.doQuery(callback); return "done!" }
everyone.now.distributeMessage = function(message){ everyone.now.receiveMessage(this.now.name, message); };

客户端代码:

<script type="text/javascript" src="http://localhost:8080/nowjs/now.js"></script>

<script type="text/javascript">
  now.ready(function(){
    // alerts "Hello World!"
    alert(now.msg);
  });
</script>

本文地址:https://www.codercto.com/soft/d/3778.html

HTTP

HTTP

David Gourley、Brian Totty、Marjorie Sayer、Anshu Aggarwal、Sailu Reddy / O'Reilly Media / 2002-10-7 / USD 54.99

Product Description Web technology has become the foundation for all sorts of critical networked applications and far-reaching methods of data exchange, and beneath it all is a fundamental protocol......一起来看看 《HTTP》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

MD5 加密
MD5 加密

MD5 加密工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具