Created
July 2, 2019 22:24
-
-
Save newbenhd/786d6b5265c75f8c71d6ebde91b53739 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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