Skip to content

Commit

Permalink
add durian.js config to use multi cores (#7781)
Browse files Browse the repository at this point in the history
* add durian.js

* rename to durian

* add Dockerfile

* add cluster.ts

* no muti cpus

* add bootstrap

* no need engine

* it seem that I can not change command

* Updatypo on version

* add durian.js config to use muti cores

* add dockerfile

* change config

* delete cluster.ts

* delete cluster.ts

* try to fix @bunicorn/server version

---------

Co-authored-by: Marwan Rabbâa <[email protected]>
  • Loading branch information
mario-huang and waghanza authored Sep 21, 2024
1 parent 6818581 commit 2b957cd
Show file tree
Hide file tree
Showing 20 changed files with 17 additions and 84 deletions.
9 changes: 0 additions & 9 deletions javascript/0http-bun/cluster.ts

This file was deleted.

2 changes: 1 addition & 1 deletion javascript/0http-bun/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ framework:
github: BackendStack21/0http-bun
version: 1.0
engines:
- bun
- durian.js
9 changes: 0 additions & 9 deletions javascript/blaze-bun/cluster.ts

This file was deleted.

2 changes: 1 addition & 1 deletion javascript/blaze-bun/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ framework:
version: 3.4

engines:
- bun
- durian.js
9 changes: 0 additions & 9 deletions javascript/bunicorn/cluster.ts

This file was deleted.

2 changes: 1 addition & 1 deletion javascript/bunicorn/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ framework:
version: 0.0

engines:
- bun
- durian.js
2 changes: 1 addition & 1 deletion javascript/bunicorn/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"@bunicorn/server": "~0.0.24"
"@bunicorn/server": "0.0.24"
}
}
7 changes: 7 additions & 0 deletions javascript/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ language:
bootstrap:
- npm install
command: node app.js
durian.js:
environment:
NODE_ENV: production
bootstrap:
- npm install -g pm2 bun
- bun install
command: pm2-runtime start app.ts --interpreter /usr/local/bin/bun -i max

framework:
engines:
Expand Down
1 change: 1 addition & 0 deletions javascript/durian.js.Dockerfile
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { NestFactory } from "@nestjs/core";
import { AppModule } from "./app.module";

export async function bootstrap() {
async function bootstrap() {
const app = await NestFactory.create(AppModule);
await app.listen(3000);
}
bootstrap();


3 changes: 0 additions & 3 deletions javascript/durian.js/cluster.ts

This file was deleted.

5 changes: 1 addition & 4 deletions javascript/durian.js/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@ framework:
github: mario-huang/durian.js
version: 1.0
engines:
- bun

bootstrap:
- bun install
- durian.js
5 changes: 0 additions & 5 deletions javascript/durian.js/nest-cli.json

This file was deleted.

20 changes: 0 additions & 20 deletions javascript/durian.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,6 @@
"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"
}
Expand Down
9 changes: 0 additions & 9 deletions javascript/hono-bun/cluster.ts

This file was deleted.

2 changes: 1 addition & 1 deletion javascript/hono-bun/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ framework:
version: 4.6

engines:
- bun
- durian.js
9 changes: 0 additions & 9 deletions javascript/vixeny-bun/cluster.ts

This file was deleted.

2 changes: 1 addition & 1 deletion javascript/vixeny-bun/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ framework:
version: 0.1

engines:
- bun
- durian.js

0 comments on commit 2b957cd

Please sign in to comment.