Skip to content

yoshuawuyts/koa-myth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Wraps a myth or rework instance into a koa middleware

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published