【文件属性】:
文件名称:micro-websocket:NodeJS中的WebSocket微服务样板
文件大小:89KB
文件格式:ZIP
更新时间:2021-05-14 06:21:30
JavaScript
NodeJS中的WebSocket微服务样板
特征
WebSocket API
中间件(压缩器,头盔,cors,favicon,身体分析器和静态)
用笑话进行单元测试,记录日志
ES6,ESLint
CI与Travis,Docker Build
安装
# install dependencies
npm install
运行测试
# run all tests
npm test
# run test coverage
npm run coverage
生成并运行
# serve with hot reload at localhost:3030
npm start
# build for production with minification
npm run build
Docker支持
建立Docker映像
bash Dockerbuild.sh
运行Docker容器
d
【文件预览】:
micro-websocket-master
----.eslintrc.json(369B)
----src()
--------middleware.js(506B)
--------util.spec.js(304B)
--------app.socket.js(221B)
--------core()
--------app.js(334B)
--------constant.js(101B)
--------app.spec.js(687B)
--------app.socket.spec.js(238B)
--------api()
--------util.js(121B)
--------index.js(287B)
--------middleware.spec.js(1KB)
----Dockerfile(201B)
----Dockerbuild.sh(129B)
----CONTRIBUTING.md(927B)
----Dockerpush.sh(170B)
----.travis.yml(420B)
----config()
--------production.json(4B)
--------test.json(19B)
--------default.json(137B)
----LICENSE(1KB)
----test()
--------unit()
--------util.js(305B)
----README.md(2KB)
----.editorconfig(214B)
----CODE_OF_CONDUCT.md(3KB)
----.gitignore(2KB)
----coverage.lcov(2KB)
----package-lock.json(320KB)
----package.json(2KB)
----static()
--------index.html(2KB)
--------favicon.ico(9KB)