0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/test/repl.js
2013-10-22 09:10:25 +04:00

21 lines
489 B
JavaScript
Executable file

#!/usr/bin/env node
var Server = require('./lib/server')
, forks = process.forks = []
, server = process.server = new Server('http://localhost:55551/')
, server2 = process.server2 = new Server('http://localhost:55552/')
process.on('exit', function() {
if (forks[0]) forks[0].kill()
if (forks[1]) forks[1].kill()
})
var repl = require('repl').start({
prompt: "> ",
input: process.stdin,
output: process.stdout,
})
repl.context.server = server
repl.context.server2 = server2