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

10 lines
203 B
TypeScript
Raw Normal View History

2018-03-31 03:30:30 +08:00
import * as cluster from 'cluster';
2022-04-05 01:37:31 +08:00
import { Server } from './server';
import { Worker } from './model/threading/Worker';
if ((cluster as any).isMaster) {
2020-01-03 05:11:59 +08:00
new Server();
} else {
Worker.process();
}