commit
8aae1983dd
@ -1,20 +1,20 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.9] - 2019-10-29
|
||||
|
||||
### Added
|
||||
|
||||
- Graphql Schema
|
||||
- default-config file and generation of config file on startup
|
||||
- DTOs
|
||||
- Home Route
|
||||
- session management
|
||||
- Sequelize models and integration
|
||||
- Sequelize-typescript integration
|
||||
- error pages
|
||||
- pagination for most list types
|
||||
- angular integration by redirecting to `index.html` on not found
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.9] - 2019-10-29
|
||||
|
||||
### Added
|
||||
|
||||
- Graphql Schema
|
||||
- default-config file and generation of config file on startup
|
||||
- DTOs
|
||||
- Home Route
|
||||
- session management
|
||||
- Sequelize models and integration
|
||||
- Sequelize-typescript integration
|
||||
- error pages
|
||||
- pagination for most list types
|
||||
- angular integration by redirecting to `index.html` on not found
|
||||
|
@ -1,11 +1,26 @@
|
||||
// tslint:disable:no-console
|
||||
import * as cluster from "cluster";
|
||||
import App from "./app";
|
||||
const numCPUs = require("os").cpus().length;
|
||||
|
||||
/**
|
||||
* async main function wrapper.
|
||||
*/
|
||||
(async () => {
|
||||
const app = new App();
|
||||
await app.init();
|
||||
app.start();
|
||||
})();
|
||||
if (cluster.isMaster) {
|
||||
console.log(`[CLUSTER] Master ${process.pid} is running`);
|
||||
for (let i = 0; i < numCPUs; i++) {
|
||||
cluster.fork();
|
||||
}
|
||||
cluster.on("exit", (worker, code, signal) => {
|
||||
console.log(`[CLUSTER] Worker ${worker.process.pid} died!`);
|
||||
});
|
||||
} else {
|
||||
|
||||
/**
|
||||
* async main function wrapper.
|
||||
*/
|
||||
(async () => {
|
||||
const app = new App(process.pid);
|
||||
await app.init();
|
||||
app.start();
|
||||
})();
|
||||
|
||||
console.log(`[CLUSTER] Worker ${process.pid} started`);
|
||||
}
|
||||
|
Loading…
Reference in New Issue