0.1.0 • Published 7 years ago
koa-map-local v0.1.0
koa-map-local
Charles map local for Koa.js
Install
$ npm i koa-map-local --save
API
const mapLocal = require('koa-map-local')
const app = new (require('koa'))
const publicDir = __dirname + '/public'
app.use(publicDir)
app.listen(1337)
mapLocal(publicDir)
GET http://proxytest.com/test/resource.json
will send `${ publicDir }/proxytest.com/test/resource.json` file
Changelog
License
the MIT License http://magicdawn.mit-license.org