An open API service indexing awesome lists of open source software.

https://github.com/braid-org/host

A convenient host for Braid apps
https://github.com/braid-org/host

Last synced: 5 months ago
JSON representation

A convenient host for Braid apps

Awesome Lists containing this project

README

          

# `host`

A nice way to host Braid apps.

Example usage:
```javascript
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:
```javascript
host.route({ path: , to: host.server('directory', 'server.js') })
```
Or you can specify an existing server's port with:
```javascript
host.route({ path: , to: {name: '', port: } })
```