connect-dir
v0.0.2
Published
folder as cms for node, like kirby
Downloads
2
Readme
Connect-content
This is connect middleware for serving static content from a "content" dir. inspired by kriby and stacey I wanted a way to use the file system as a basic cms.
this middleware attaches the data found in the "content" directory to the req
object
it does not however provide any templating logic. express has got that covered
Usage
var app = express()
var cms = require('connect-dir')
app.use(cms())
app.get('*', function(req, res) {
var data = req.content
res.json(data)
})
app.listen(process.env.PORT || 3000)