updated cluster docs
This commit is contained in:
parent
64fef8b3a5
commit
f35940636e
4 changed files with 12 additions and 7 deletions
|
@ -808,10 +808,10 @@ Writing explicit buffers, int types, doubles, floats etc. as well as big endian
|
|||
|
||||
```javascript
|
||||
|
||||
import fs from 'fs'
|
||||
import fs from 'fs';
|
||||
import ipc from 'node-ipc';
|
||||
import {cpus} from 'os';
|
||||
import cluster from 'cluster'
|
||||
import cluster from 'cluster';
|
||||
|
||||
const cpuCount=cpus().length;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const fs = from 'fs');
|
||||
const ipc = from '../../node-ipc');
|
||||
import fs from 'fs';
|
||||
import ipc from '../../node-ipc';
|
||||
|
||||
const socketPath = '/tmp/ipc.sock';
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
const fs = from 'fs');
|
||||
import ipc from '../../../node-ipc.js';
|
||||
const cpuCount = from 'os').cpus().length;
|
||||
const cluster = from 'cluster');
|
||||
import fs from 'fs';
|
||||
import {cpus} from 'os';
|
||||
import cluster from 'cluster';
|
||||
|
||||
const cpuCount=cpus().length;
|
||||
const socketPath = '/tmp/ipc.sock';
|
||||
|
||||
ipc.config.unlink = false;
|
||||
|
|
|
@ -3,7 +3,10 @@ import IPC from './services/IPC.js';
|
|||
class IPCModule extends IPC{
|
||||
constructor(){
|
||||
super();
|
||||
|
||||
}
|
||||
|
||||
IPC=IPC;
|
||||
}
|
||||
|
||||
const singleton=new IPCModule;
|
||||
|
|
Loading…
Reference in a new issue