1.3.2 • Published 6 years ago

cbrews.webserver v1.3.2

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

Webserver

This application is a basic api-based initializable webserver wrapper for:

  • express
  • socket.io

Usage

Initialize a webserver:

const options = {
  port: 4001
}
const web = new Webserver(options);

Create a router:

const router = web.getRouter('myroute');

Create a route (with json handling):

router.get('mypath', web.handle(req => ({success: true})));

Start the server:

web.start();
curl localhost:4001/myroute/mypath

// {
//   "success": "true"
// }
1.3.2

6 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago