Last active
February 12, 2016 19:09
-
-
Save inxilpro/1c574e82ceae543a40a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| import { randomBytes } from 'crypto'; | |
| import Client from 'deepstream.io-client-js'; | |
| export default function(server, port = 6021, bytes = 256) { | |
| const username = '__superadmin__'; | |
| const password = randomBytes(bytes).toString('hex'); | |
| server.once('started', () => { | |
| server.client = Client(`localhost:${port}`).login({ | |
| username, | |
| password | |
| }); | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment