1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/src/backend/index.ts

11 lines
250 B
TypeScript
Raw Normal View History

2018-03-31 03:30:30 +08:00
import * as cluster from 'cluster';
import {Server} from './server';
import {Worker} from './model/threading/Worker';
if ((cluster as any).isMaster) {
2020-01-03 05:11:59 +08:00
// tslint:disable-next-line:no-unused-expression
new Server();
} else {
Worker.process();
}