1.0.1 • Published 9 years ago

koa-myth v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

koa-myth

NPM version build status Test coverage Downloads

Wraps a myth or rework instance into a koa middleware.

Installation

$ npm install koa-myth

Usage

const km     = require('koa-myth')
const rework = require('rework')
const http   = require('http')
const myth   = require('myth')
const koa    = require('koa')
const fs     = require('fs')

const port = process.env.port || 1337
const app  = koa()

const css    = fs.readFileSync('index.css', 'utf8')
const bundle = rework(css).use(myth())
app.use(km(bundle))

http.createServer(app.callback()).listen(port)

See Also

License

MIT