updated cluster docs

This commit is contained in:
Brandon Nozaki Miller 2021-07-07 20:10:40 +00:00 committed by GitHub
parent 64fef8b3a5
commit f35940636e
4 changed files with 12 additions and 7 deletions

View File

@ -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;

View File

@ -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';

View File

@ -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;

View File

@ -3,7 +3,10 @@ import IPC from './services/IPC.js';
class IPCModule extends IPC{
constructor(){
super();
}
IPC=IPC;
}
const singleton=new IPCModule;