7.1.0 • Published 6 years ago

apigeon v7.1.0

Weekly downloads
92
License
SEE LICENSE IN LI...
Repository
github
Last release
6 years ago

Apigeon

Dependency Status

An npm plugin to generate a server application. It can be used with either standard http requests or websockets.

Installation

npm install apigeon

Usage

A basic example of how to use Apigeon.

'use strict'

const Url = require( 'url' )
const Apigeon = require( 'apigeon' )

const PORT = 8080

let server = new Apigeon( {
  mode: {
    http: true,
    socket: true
  },
  httpRoutes: ( url ) => {
    let urlParts = Url.parse( url )
    return require( __dirname + '/routes/http' + urlParts.pathname )
  },
  socketRoutes: ( url ) => {
    let urlParts = Url.parse( url )
    return require( __dirname + '/routes/socket' + urlParts.pathname )
  }
} )

server.start( PORT )

API

ClassApi documentation
Apigeonhttps://github.com/vladfilipro/apigeon/blob/master/docs/apigeon.md
ConnectionClasshttps://github.com/vladfilipro/apigeon/blob/master/docs/connection.md
ErrorClasshttps://github.com/vladfilipro/apigeon/blob/master/docs/error.md
RouteClasshttps://github.com/vladfilipro/apigeon/blob/master/docs/route.md
HttpRouteClasshttps://github.com/vladfilipro/apigeon/blob/master/docs/httproute.md
SocketRouteClasshttps://github.com/vladfilipro/apigeon/blob/master/docs/socketroute.md

Examples

In order to run the examples provided with the package, clone the repository found in github, and then run the following commands:

npm install

  • To test the examples:
node test
7.1.0

6 years ago

7.0.1

6 years ago

7.0.0

6 years ago

6.2.1

6 years ago

6.2.0

6 years ago

6.1.2

6 years ago

6.1.1

6 years ago

6.1.0

6 years ago

6.0.0

6 years ago

5.0.0

7 years ago

4.1.1

7 years ago

4.1.0

7 years ago

4.0.2

7 years ago

4.0.1

7 years ago

4.0.0

7 years ago

3.4.2

7 years ago

3.4.1

7 years ago

3.4.0

7 years ago

3.3.0

7 years ago

3.2.1

7 years ago

3.2.0

7 years ago

3.1.4

7 years ago

3.1.3

7 years ago

3.1.2

7 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.0.3

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago