restpush:在休息服务中推送通知

时间:2021-05-12 00:13:49
【文件属性】:
文件名称:restpush:在休息服务中推送通知
文件大小:48KB
文件格式:ZIP
更新时间:2021-05-12 00:13:49
JavaScript 一个简单的套接字服务器 这是一个简单的套接字服务器,它侦听notification事件并触发notification事件。 ##本地设置当前它依赖于“ restify”服务器,但是稍后将被删除。 安装依赖项: npm install 运行服务器: node index . js 这将在localhost:8080上运行服务器 客户端上的代码,即浏览器: var socket = io . connect ( 'http://localhost:8080' ) ; // use this socket to send event to server socket . on ( 'notification' , function ( data ) { // receives event from server } ) ; // emits event to server
【文件预览】:
restpush-master
----.gitignore(816B)
----README.md(1KB)
----package.json(304B)
----client()
--------js()
--------index.html(748B)
----socketconnection.js(3KB)
----index.js(588B)

网友评论