expediate

0.0.3 • Public • Published

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.

NPM Version NPM Downloads

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

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i expediate

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

23.7 kB

Total Files

7

Last publish

Collaborators

  • axfab