This commit is contained in:
Mathew Kurian 2016-01-22 15:16:11 -06:00
commit e7623e2082
2 changed files with 8 additions and 6 deletions

View file

@ -5,7 +5,7 @@ import Scribe from '../index.js'
import * as JSON2 from '../libs/JSON2' import * as JSON2 from '../libs/JSON2'
const port = 4005; const port = 4005;
const socketPort = 4000; const socketPort = 50000;
const cpus = 4; const cpus = 4;
if (cluster.isMaster) { if (cluster.isMaster) {
@ -18,7 +18,7 @@ if (cluster.isMaster) {
mongoUri: 'mongodb://localhost/scribe', mongoUri: 'mongodb://localhost/scribe',
publicUri: 'http://localhost', publicUri: 'http://localhost',
basePath: 'scribe/', basePath: 'scribe/',
socketPort: 4000 + cluster.worker.id - 1, socketPort: socketPort + cluster.worker.id - 1, // assign a port to a worker worker
web: { web: {
router: { router: {
username: 'build', username: 'build',
@ -31,7 +31,7 @@ if (cluster.isMaster) {
useSession: true useSession: true
}, },
client: { client: {
port: 4005, port: port,
socketPorts: [socketPort, socketPort + 1, socketPort + 2, socketPort + 3], socketPorts: [socketPort, socketPort + 1, socketPort + 2, socketPort + 3],
exposed: { exposed: {
all: {label: 'all', query: {expose: {$exists: true}}}, all: {label: 'all', query: {expose: {$exists: true}}},

View file

@ -3,12 +3,14 @@ import Scribe from '../index.js'
import * as JSON2 from '../libs/JSON2' import * as JSON2 from '../libs/JSON2'
const port = 4005; const port = 4005;
const socketPort = 50000;
const console = new Scribe(process.pid, { const console = new Scribe(process.pid, {
name: 'Scribe', name: 'Scribe',
mongoUri: 'mongodb://localhost/scribe', mongoUri: 'mongodb://localhost/scribe',
publicUri: 'http://localhost', publicUri: 'http://localhost',
basePath: 'scribe/', basePath: 'scribe/',
socketPort: 4000, socketPort: socketPort,
web: { web: {
router: { router: {
username: 'build', username: 'build',
@ -19,8 +21,8 @@ const console = new Scribe(process.pid, {
useSession: true useSession: true
}, },
client: { client: {
port: 4005, port: port,
socketPorts: [4000], socketPorts: [socketPort],
exposed: { exposed: {
all: {label: 'all', query: {expose: {$exists: true}}}, all: {label: 'all', query: {expose: {$exists: true}}},
error: {label: 'error', query: {expose: 'error'}}, error: {label: 'error', query: {expose: 'error'}},