(Ryan的Koa系列博客)9.依赖库:statuses(本文尚未完成)

前言

安装

npm install statuses

依赖

var status = require('statuses')

用法

var code = status(Integer || String)

If Integer or String is a valid HTTP code or status message, then the appropriate code will be returned. Otherwise, an error will be thrown.

你可能感兴趣的:(koa,koa2)