Skip to content

Commit

Permalink
add cluster.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-huang committed Sep 11, 2024
1 parent c1497ff commit bb30e52
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 83 deletions.
5 changes: 0 additions & 5 deletions javascript/durian.js/Dockerfile

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions javascript/durian.js/cluster.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import os from "node:os";

const numCPUs = os.cpus().length;
for (let i = 0; i < numCPUs; i++) {
Bun.spawn(["bun", "app.ts"], {
stdio: ["inherit", "inherit", "inherit"],
env: { ...process.env },
});
}
5 changes: 0 additions & 5 deletions javascript/durian.js/nest-cli.json

This file was deleted.

74 changes: 1 addition & 73 deletions javascript/durian.js/package.json
Original file line number Diff line number Diff line change
@@ -1,78 +1,6 @@
{
"name": "durian.js",
"version": "1.0.0",
"description": "Run NestJS on Bun Blazingly Fast",
"author": "mario-huang",
"license": "MIT",
"keywords": [
"durian",
"durianjs",
"nest",
"nestjs",
"bun"
],
"scripts": {
"build": "durian build",
"start": "durian start",
"start:debug": "durian start:debug",
"start:dev": "durian start:dev",
"start:prod": "durian start:prod",
"compile": "durian compile",
"compile:linux-x64": "durian compile:linux-x64",
"compile:linux-arm64": "durian compile:linux-arm64",
"compile:windows-x64": "durian compile:windows-x64",
"compile:darwin-x64": "durian compile:darwin-x64",
"compile:darwin-arm64": "durian compile:darwin-arm64",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "durian test",
"test:watch": "durian test:watch",
"test:cov": "durian test:cov",
"test:debug": "durian test:debug",
"test:e2e": "durian test:e2e"
},
"dependencies": {
"durian.js": "^1.0.0"
},
"devDependencies": {
"@nestjs/cli": "^10.0.0",
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.0.0",
"@types/bun": "^1.1.6",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.1",
"@types/supertest": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"eslint": "^8.42.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"source-map-support": "^0.5.21",
"supertest": "^7.0.0",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.3",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.3"
},
"jest": {
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "src",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"collectCoverageFrom": [
"**/*.(t|j)s"
],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
"durian.js": "~1.0.0"
}
}

0 comments on commit bb30e52

Please sign in to comment.