Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
misc: adding .aegir file
  • Loading branch information
dryajov committed Oct 15, 2017
commit a383f131c48fd8bb710e22470379b52281a428a8
28 changes: 28 additions & 0 deletions .aegir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
'use strict'

const WebRTCDirect = require('./src')
const pull = require('pull-stream')
const multiaddr = require('multiaddr')

const ma = multiaddr('/ip4/127.0.0.1/tcp/12345/http/p2p-webrtc-direct')
let listener

function boot (done) {
const wd = new WebRTCDirect()
listener = wd.createListener((conn) => pull(conn, conn))
listener.listen(ma, done)
listener.on('listening', () => {
console.log('gulp listener started on:', ma.toString())
})
}

function shutdown (done) {
listener.close(done)
}

module.exports = {
hooks: {
pre: boot,
post: shutdown
}
}