@braidjs/host

1.1.3 • Public • Published

host

A nice way to host Braid apps.

Example usage:

var host = require('@braidjs/host')

host.route({ path: '/pub*',  to: host.server('micropub') })
host.route({ path: '/*',     to: host.server('invisible.college') })

console.log('Making the host!')
host.listen(443)

This short-form example assumes you have web servers implemented at ./micropub/server.js and ./invisible.college/server.js, but you can also specify an arbitrary directory and script with:

host.route({ path: <path>, to: host.server('directory', 'server.js') })

Or you can specify an existing server's port with:

host.route({ path: <path>, to: {name: '<some name>', port: <port number>} })

Readme

Keywords

none

Package Sidebar

Install

npm i @braidjs/host

Weekly Downloads

1

Version

1.1.3

License

none

Unpacked Size

5.55 kB

Total Files

3

Last publish

Collaborators

  • glittle
  • toomim
  • josephg
  • canadaduane