Skip to content

Instantly share code, notes, and snippets.

@newbenhd
Created July 2, 2019 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save newbenhd/786d6b5265c75f8c71d6ebde91b53739 to your computer and use it in GitHub Desktop.
Save newbenhd/786d6b5265c75f8c71d6ebde91b53739 to your computer and use it in GitHub Desktop.
"use strict"
const bodyParser = require('body-parser')
const serveStatic = require('serve-static')
function wrapper = () => {
const locals = {}
return (path, callback) => {
on,
}
}
const on = (str, callback) => {
}
function use() {
this.on()
}
wrapper.prototype.json = (option) => {
return bodyParser.json()
}
wrapper.prototype.static = () => {
return serveStatic('public/ftp', {'index': ['index.html', 'index.htm']})
}
wrapper.prototype.Router = (option) => {
}
wrapper.prototype.urlencoded = (option) => {
return bodyParser.urlencoded(option)
}
module.exports = wrapper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment