node-test icon indicating copy to clipboard operation
node-test copied to clipboard

Nodejs demo

trafficstars

node-test

nodejs test demos

平时写的一些nodejs的小demo,不定时更新:

在线预览

  • websocket: http://demo.wanghx.cn/wsindex
  • 普通上传:http://demo.wanghx.cn/uindex
  • 移动端图片上传:http://demo.wanghx.cn/uindex_2
  • pjax:http://demo.wanghx.cn/pjax/pjax1.html
  • 爬虫:http://demo.wanghx.cn/creeper
  • bigpipe:http://demo.wanghx.cn/bigpipe

本地

// 开发
$ npm run dev

// fork
$ npm run start

文件地址

co函数简易实现

koa中间件简易实现

koa中间件实现_2

bigpipe测试

简易爬虫

pushState + ajax = pjax

图片上传预览及文件上传

移动端图片压缩上传demo

websocket实现,数据收发帧解析