Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. 简介 在团队开发中,无论是写前端(js,css,html) ,还是后端 ,我们需要解决一个问题:如何统一团队代码风格. 这篇文章主要是使用pre-git , eslint , js-beautify 实现代码风格控制. 下面分别介绍这三个工具和使用方式: pre-git 该工具能实现git hook的功能,在git的流程中插入一些自定义行为,例如com…
KoaHub平台基于Node.js开发的Koa 链接支付宝插件代码信息详情 easy-alipay alipay payment & notification APIs easy-alipay Nodejs based Alipay payment & notification APIs API Payment.createDirectPay() Create an Ali direct payment, return an Ali url so client can go to Ali…
随着互联网快速发展,互联网信息安全越来越受到大家重视,HTTPS 应该是近两年各大厂商都在尽力普及的技术之一.国内大厂基本上已经全面普及了 HTTPS. 本文首发于我的个人网站:听说 - https://tasaid.com/,建议在我的个人网站阅读,拥有更好的阅读体验. 前端开发 QQ 群:377786580 HTTPS 现状 早在 2016 年底,我就写过 < 从 HTTP 到 HTTPS 系列 >文章来讲解 HTTPS.当时结合本站的部署经验,给大家详细介绍了 < IIS 部署免费…
shelljs Portable Unix shell commands for Node.js ShellJS - Unix shell commands for Node.js     ShellJS is a portable (Windows/Linux/OS X) implementation of Unix shell commands on top of the Node.js API. You can use it to eliminate your shell script's…
koa-jwt Koa JWT authentication middleware. koa-jwt Koa middleware that validates JSON Web Tokens and sets ctx.state.user (by default) if a valid token is provided. This module lets you authenticate HTTP requests using JSON Web Tokens in your Koa (nod…
一.背景: 产线机器出bug,不能重启服务,需要保留现场,问题不好排查,只能靠远程debug. 二.实现步骤 1. 登录远程机器执行如下命令,nodePid为node服务的pid kill -usr1 nodePid #此命令不会重启服务 2. 本地执行,映射远程服务9229端口到本地端口9220,后续chrome调试使用 ssh -L 9220:localhost:9229 username@40.xxx.xx.xxx 3. 本地机器,chrome打开 chrome://inspect/,配置…
koahub-skip koahub skip middleware koahub skip Conditionally skip a middleware when a condition is met. Install npm i koahub-skip --save Usage With existing middlewares: var skip = require('koahub-skip'); var serve = require('koa-static'); var static…
moment Parse, validate, manipulate, and display dates      A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates. Documentation Port to ECMAScript 6 (version 2.10.0) Moment 2.10.0 does not bring any new fea…
koa-router Router middleware for koa. Provides RESTful resource routing. koa-router       Router middleware for koa Express-style routing using app.get, app.put, app.post, etc. Named URL parameters. Named routes with URL generation. Responds to OPTIO…
koa-ejs ejs render middleware for koa koa-ejs Koa ejs view render middleware. support all feature of ejs. Usage Example var koa = require('koa'); var render = require('koa-ejs'); var app = koa(); render(app, { root: path.join(__dirname, 'view'), layo…