expediate
v0.0.3
Published
Fast and simple, minimalist web framework
Downloads
3
Readme
Expediate
This small library serve as a router facility for a web server. For compatibility reason it keep the exact same interface as express.js, however it doesn't intent to provide all the features.
const expediate = require('expediate')
const app = expediate()
app.get('/', function (req, res) {
res.send('Hello World')
})
app.listen(3000)
The main reason for this package is that expressjs grow to become extra complicated with tons of dependencies. Expediate aims to keep thing simple while retaining the most widely used features.
Installation
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js.
If this is a brand new project, make sure to create a package.json
first with
the npm init
command.
Installation is done using the
npm install
command:
$ npm install expediate
Usage
Middleware
json => Parse Json body static => Serve static files urlencdeded => Parse url encoded
var apiApp = expediate()
apiApp.use('/myEndpoint', ...)
var app = expediate();
var app.use('/api', apiApp);
app.listen(80)
app.listen(443, { key: 'xx', cert: 'xx' })
apiApp.listen(8900) // Only api