From e6307361197899d610ea94869665573df03d33e9 Mon Sep 17 00:00:00 2001 From: Mario <6395323+mario-huang@users.noreply.github.com> Date: Wed, 11 Sep 2024 21:48:42 +0800 Subject: [PATCH 1/9] add durian.js --- javascript/durian.js/config.yaml | 6 ++ javascript/durian.js/nest-cli.json | 5 ++ javascript/durian.js/package.json | 78 ++++++++++++++++++++++ javascript/durian.js/src/app.controller.ts | 19 ++++++ javascript/durian.js/src/app.module.ts | 9 +++ javascript/durian.js/src/app.ts | 8 +++ javascript/durian.js/tsconfig.json | 31 +++++++++ 7 files changed, 156 insertions(+) create mode 100644 javascript/durian.js/config.yaml create mode 100644 javascript/durian.js/nest-cli.json create mode 100644 javascript/durian.js/package.json create mode 100644 javascript/durian.js/src/app.controller.ts create mode 100644 javascript/durian.js/src/app.module.ts create mode 100644 javascript/durian.js/src/app.ts create mode 100644 javascript/durian.js/tsconfig.json diff --git a/javascript/durian.js/config.yaml b/javascript/durian.js/config.yaml new file mode 100644 index 00000000000..d89799cd58d --- /dev/null +++ b/javascript/durian.js/config.yaml @@ -0,0 +1,6 @@ +framework: + website: https://github.com/mario-huang/durian.js + version: 1.0.0 + + engines: + - bun diff --git a/javascript/durian.js/nest-cli.json b/javascript/durian.js/nest-cli.json new file mode 100644 index 00000000000..991500dffbe --- /dev/null +++ b/javascript/durian.js/nest-cli.json @@ -0,0 +1,5 @@ +{ + "collection": "@nestjs/schematics", + "sourceRoot": "src", + "entryFile": "app" +} diff --git a/javascript/durian.js/package.json b/javascript/durian.js/package.json new file mode 100644 index 00000000000..34ca1e075ef --- /dev/null +++ b/javascript/durian.js/package.json @@ -0,0 +1,78 @@ +{ + "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" + } +} diff --git a/javascript/durian.js/src/app.controller.ts b/javascript/durian.js/src/app.controller.ts new file mode 100644 index 00000000000..43046fd342c --- /dev/null +++ b/javascript/durian.js/src/app.controller.ts @@ -0,0 +1,19 @@ +import { Controller, Get, Param, Post } from "@nestjs/common"; + +@Controller() +export class AppController { + @Get() + getHello(): string { + return ""; + } + + @Get("/user/:id") + getUserId(@Param("id") id: string): string { + return id; + } + + @Post("/user") + postUser(): string { + return ""; + } +} diff --git a/javascript/durian.js/src/app.module.ts b/javascript/durian.js/src/app.module.ts new file mode 100644 index 00000000000..d51b3c026fc --- /dev/null +++ b/javascript/durian.js/src/app.module.ts @@ -0,0 +1,9 @@ +import { Module } from "@nestjs/common"; +import { AppController } from "./app.controller"; + +@Module({ + imports: [], + controllers: [AppController], + providers: [], +}) +export class AppModule {} diff --git a/javascript/durian.js/src/app.ts b/javascript/durian.js/src/app.ts new file mode 100644 index 00000000000..9ac1a3e0caa --- /dev/null +++ b/javascript/durian.js/src/app.ts @@ -0,0 +1,8 @@ +import { NestFactory } from "@nestjs/core"; +import { AppModule } from "./app.module"; + +async function bootstrap() { + const app = await NestFactory.create(AppModule); + await app.listen(3000); +} +bootstrap(); diff --git a/javascript/durian.js/tsconfig.json b/javascript/durian.js/tsconfig.json new file mode 100644 index 00000000000..dfae61ebe24 --- /dev/null +++ b/javascript/durian.js/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + /* nestjs */ + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + /* bun */ + // Enable latest features + "lib": ["ESNext"], + "target": "ESNext", + "module": "ESNext", + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + // Best practices + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + // Some stricter flags + "noUnusedLocals": true, + "noUnusedParameters": true, + "noPropertyAccessFromIndexSignature": true + } +} From 4fb9732a911d3327800b50b9b3c98c0bc9bab6d9 Mon Sep 17 00:00:00 2001 From: Mario <6395323+mario-huang@users.noreply.github.com> Date: Wed, 11 Sep 2024 22:09:08 +0800 Subject: [PATCH 2/9] rename to durian --- javascript/{durian.js => durian}/config.yaml | 0 javascript/{durian.js => durian}/nest-cli.json | 0 javascript/{durian.js => durian}/package.json | 2 +- javascript/{durian.js => durian}/src/app.controller.ts | 0 javascript/{durian.js => durian}/src/app.module.ts | 0 javascript/{durian.js => durian}/src/app.ts | 0 javascript/{durian.js => durian}/tsconfig.json | 0 7 files changed, 1 insertion(+), 1 deletion(-) rename javascript/{durian.js => durian}/config.yaml (100%) rename javascript/{durian.js => durian}/nest-cli.json (100%) rename javascript/{durian.js => durian}/package.json (98%) rename javascript/{durian.js => durian}/src/app.controller.ts (100%) rename javascript/{durian.js => durian}/src/app.module.ts (100%) rename javascript/{durian.js => durian}/src/app.ts (100%) rename javascript/{durian.js => durian}/tsconfig.json (100%) diff --git a/javascript/durian.js/config.yaml b/javascript/durian/config.yaml similarity index 100% rename from javascript/durian.js/config.yaml rename to javascript/durian/config.yaml diff --git a/javascript/durian.js/nest-cli.json b/javascript/durian/nest-cli.json similarity index 100% rename from javascript/durian.js/nest-cli.json rename to javascript/durian/nest-cli.json diff --git a/javascript/durian.js/package.json b/javascript/durian/package.json similarity index 98% rename from javascript/durian.js/package.json rename to javascript/durian/package.json index 34ca1e075ef..bd6724d4672 100644 --- a/javascript/durian.js/package.json +++ b/javascript/durian/package.json @@ -1,5 +1,5 @@ { - "name": "durian.js", + "name": "durian", "version": "1.0.0", "description": "Run NestJS on Bun Blazingly Fast", "author": "mario-huang", diff --git a/javascript/durian.js/src/app.controller.ts b/javascript/durian/src/app.controller.ts similarity index 100% rename from javascript/durian.js/src/app.controller.ts rename to javascript/durian/src/app.controller.ts diff --git a/javascript/durian.js/src/app.module.ts b/javascript/durian/src/app.module.ts similarity index 100% rename from javascript/durian.js/src/app.module.ts rename to javascript/durian/src/app.module.ts diff --git a/javascript/durian.js/src/app.ts b/javascript/durian/src/app.ts similarity index 100% rename from javascript/durian.js/src/app.ts rename to javascript/durian/src/app.ts diff --git a/javascript/durian.js/tsconfig.json b/javascript/durian/tsconfig.json similarity index 100% rename from javascript/durian.js/tsconfig.json rename to javascript/durian/tsconfig.json From c1497ff0fd3ebb8953e60a0f14961e5ebbb708d4 Mon Sep 17 00:00:00 2001 From: Mario <6395323+mario-huang@users.noreply.github.com> Date: Wed, 11 Sep 2024 22:36:29 +0800 Subject: [PATCH 3/9] add Dockerfile --- javascript/durian.js/Dockerfile | 5 +++++ javascript/{durian => durian.js}/config.yaml | 0 javascript/{durian => durian.js}/nest-cli.json | 0 javascript/{durian => durian.js}/package.json | 2 +- javascript/{durian => durian.js}/src/app.controller.ts | 0 javascript/{durian => durian.js}/src/app.module.ts | 0 javascript/{durian => durian.js}/src/app.ts | 0 javascript/{durian => durian.js}/tsconfig.json | 0 8 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 javascript/durian.js/Dockerfile rename javascript/{durian => durian.js}/config.yaml (100%) rename javascript/{durian => durian.js}/nest-cli.json (100%) rename javascript/{durian => durian.js}/package.json (98%) rename javascript/{durian => durian.js}/src/app.controller.ts (100%) rename javascript/{durian => durian.js}/src/app.module.ts (100%) rename javascript/{durian => durian.js}/src/app.ts (100%) rename javascript/{durian => durian.js}/tsconfig.json (100%) diff --git a/javascript/durian.js/Dockerfile b/javascript/durian.js/Dockerfile new file mode 100644 index 00000000000..aa34e571887 --- /dev/null +++ b/javascript/durian.js/Dockerfile @@ -0,0 +1,5 @@ +FROM oven/bun +WORKDIR /app +COPY . . +RUN bun install +ENTRYPOINT ["bun", "run", "start"] diff --git a/javascript/durian/config.yaml b/javascript/durian.js/config.yaml similarity index 100% rename from javascript/durian/config.yaml rename to javascript/durian.js/config.yaml diff --git a/javascript/durian/nest-cli.json b/javascript/durian.js/nest-cli.json similarity index 100% rename from javascript/durian/nest-cli.json rename to javascript/durian.js/nest-cli.json diff --git a/javascript/durian/package.json b/javascript/durian.js/package.json similarity index 98% rename from javascript/durian/package.json rename to javascript/durian.js/package.json index bd6724d4672..34ca1e075ef 100644 --- a/javascript/durian/package.json +++ b/javascript/durian.js/package.json @@ -1,5 +1,5 @@ { - "name": "durian", + "name": "durian.js", "version": "1.0.0", "description": "Run NestJS on Bun Blazingly Fast", "author": "mario-huang", diff --git a/javascript/durian/src/app.controller.ts b/javascript/durian.js/src/app.controller.ts similarity index 100% rename from javascript/durian/src/app.controller.ts rename to javascript/durian.js/src/app.controller.ts diff --git a/javascript/durian/src/app.module.ts b/javascript/durian.js/src/app.module.ts similarity index 100% rename from javascript/durian/src/app.module.ts rename to javascript/durian.js/src/app.module.ts diff --git a/javascript/durian/src/app.ts b/javascript/durian.js/src/app.ts similarity index 100% rename from javascript/durian/src/app.ts rename to javascript/durian.js/src/app.ts diff --git a/javascript/durian/tsconfig.json b/javascript/durian.js/tsconfig.json similarity index 100% rename from javascript/durian/tsconfig.json rename to javascript/durian.js/tsconfig.json From bb30e520438fd1ddcd2fd099edf6559b0f66b17d Mon Sep 17 00:00:00 2001 From: Mario <6395323+mario-huang@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:06:52 +0800 Subject: [PATCH 4/9] add cluster.ts --- javascript/durian.js/Dockerfile | 5 -- .../durian.js/{src => }/app.controller.ts | 0 javascript/durian.js/{src => }/app.module.ts | 0 javascript/durian.js/{src => }/app.ts | 0 javascript/durian.js/cluster.ts | 9 +++ javascript/durian.js/nest-cli.json | 5 -- javascript/durian.js/package.json | 74 +------------------ 7 files changed, 10 insertions(+), 83 deletions(-) delete mode 100644 javascript/durian.js/Dockerfile rename javascript/durian.js/{src => }/app.controller.ts (100%) rename javascript/durian.js/{src => }/app.module.ts (100%) rename javascript/durian.js/{src => }/app.ts (100%) create mode 100644 javascript/durian.js/cluster.ts delete mode 100644 javascript/durian.js/nest-cli.json diff --git a/javascript/durian.js/Dockerfile b/javascript/durian.js/Dockerfile deleted file mode 100644 index aa34e571887..00000000000 --- a/javascript/durian.js/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM oven/bun -WORKDIR /app -COPY . . -RUN bun install -ENTRYPOINT ["bun", "run", "start"] diff --git a/javascript/durian.js/src/app.controller.ts b/javascript/durian.js/app.controller.ts similarity index 100% rename from javascript/durian.js/src/app.controller.ts rename to javascript/durian.js/app.controller.ts diff --git a/javascript/durian.js/src/app.module.ts b/javascript/durian.js/app.module.ts similarity index 100% rename from javascript/durian.js/src/app.module.ts rename to javascript/durian.js/app.module.ts diff --git a/javascript/durian.js/src/app.ts b/javascript/durian.js/app.ts similarity index 100% rename from javascript/durian.js/src/app.ts rename to javascript/durian.js/app.ts diff --git a/javascript/durian.js/cluster.ts b/javascript/durian.js/cluster.ts new file mode 100644 index 00000000000..a89a5e70d99 --- /dev/null +++ b/javascript/durian.js/cluster.ts @@ -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 }, + }); +} diff --git a/javascript/durian.js/nest-cli.json b/javascript/durian.js/nest-cli.json deleted file mode 100644 index 991500dffbe..00000000000 --- a/javascript/durian.js/nest-cli.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "collection": "@nestjs/schematics", - "sourceRoot": "src", - "entryFile": "app" -} diff --git a/javascript/durian.js/package.json b/javascript/durian.js/package.json index 34ca1e075ef..5fa2c2d47f7 100644 --- a/javascript/durian.js/package.json +++ b/javascript/durian.js/package.json @@ -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" } } From 8d2455178e2714cb449a5c9ebf7c400a2e8f60eb Mon Sep 17 00:00:00 2001 From: Mario <6395323+mario-huang@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:28:03 +0800 Subject: [PATCH 5/9] no muti cpus --- javascript/durian.js/app.ts | 4 ++-- javascript/durian.js/cluster.ts | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/javascript/durian.js/app.ts b/javascript/durian.js/app.ts index 9ac1a3e0caa..88cf07debd3 100644 --- a/javascript/durian.js/app.ts +++ b/javascript/durian.js/app.ts @@ -1,8 +1,8 @@ import { NestFactory } from "@nestjs/core"; import { AppModule } from "./app.module"; -async function bootstrap() { +export async function bootstrap() { const app = await NestFactory.create(AppModule); await app.listen(3000); } -bootstrap(); + diff --git a/javascript/durian.js/cluster.ts b/javascript/durian.js/cluster.ts index a89a5e70d99..37d4f4a0cad 100644 --- a/javascript/durian.js/cluster.ts +++ b/javascript/durian.js/cluster.ts @@ -1,9 +1,3 @@ -import os from "node:os"; +import { bootstrap } from "./app"; -const numCPUs = os.cpus().length; -for (let i = 0; i < numCPUs; i++) { - Bun.spawn(["bun", "app.ts"], { - stdio: ["inherit", "inherit", "inherit"], - env: { ...process.env }, - }); -} +bootstrap(); From e3a30f9f34cea854f540d8038c92eda7e9e21277 Mon Sep 17 00:00:00 2001 From: Mario <6395323+mario-huang@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:56:57 +0800 Subject: [PATCH 6/9] add bootstrap --- javascript/durian.js/cluster.ts | 3 -- javascript/durian.js/config.yaml | 7 ++++- javascript/durian.js/nest-cli.json | 5 +++ javascript/durian.js/package.json | 31 +++++++++++++++++++ .../durian.js/{ => src}/app.controller.ts | 0 javascript/durian.js/{ => src}/app.module.ts | 0 javascript/durian.js/{ => src}/app.ts | 1 + 7 files changed, 43 insertions(+), 4 deletions(-) delete mode 100644 javascript/durian.js/cluster.ts create mode 100644 javascript/durian.js/nest-cli.json rename javascript/durian.js/{ => src}/app.controller.ts (100%) rename javascript/durian.js/{ => src}/app.module.ts (100%) rename javascript/durian.js/{ => src}/app.ts (93%) diff --git a/javascript/durian.js/cluster.ts b/javascript/durian.js/cluster.ts deleted file mode 100644 index 37d4f4a0cad..00000000000 --- a/javascript/durian.js/cluster.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { bootstrap } from "./app"; - -bootstrap(); diff --git a/javascript/durian.js/config.yaml b/javascript/durian.js/config.yaml index d89799cd58d..f644abacc78 100644 --- a/javascript/durian.js/config.yaml +++ b/javascript/durian.js/config.yaml @@ -1,6 +1,11 @@ framework: - website: https://github.com/mario-huang/durian.js + github: mario-huang/durian.js version: 1.0.0 engines: - bun + + bootstrap: + - bun install + + command: bun run start \ No newline at end of file diff --git a/javascript/durian.js/nest-cli.json b/javascript/durian.js/nest-cli.json new file mode 100644 index 00000000000..991500dffbe --- /dev/null +++ b/javascript/durian.js/nest-cli.json @@ -0,0 +1,5 @@ +{ + "collection": "@nestjs/schematics", + "sourceRoot": "src", + "entryFile": "app" +} diff --git a/javascript/durian.js/package.json b/javascript/durian.js/package.json index 5fa2c2d47f7..39377603cec 100644 --- a/javascript/durian.js/package.json +++ b/javascript/durian.js/package.json @@ -1,5 +1,36 @@ { "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" } diff --git a/javascript/durian.js/app.controller.ts b/javascript/durian.js/src/app.controller.ts similarity index 100% rename from javascript/durian.js/app.controller.ts rename to javascript/durian.js/src/app.controller.ts diff --git a/javascript/durian.js/app.module.ts b/javascript/durian.js/src/app.module.ts similarity index 100% rename from javascript/durian.js/app.module.ts rename to javascript/durian.js/src/app.module.ts diff --git a/javascript/durian.js/app.ts b/javascript/durian.js/src/app.ts similarity index 93% rename from javascript/durian.js/app.ts rename to javascript/durian.js/src/app.ts index 88cf07debd3..f1261832e6f 100644 --- a/javascript/durian.js/app.ts +++ b/javascript/durian.js/src/app.ts @@ -5,4 +5,5 @@ export async function bootstrap() { const app = await NestFactory.create(AppModule); await app.listen(3000); } +bootstrap(); From c66fb50f46158e8fdc2188e80f019ae3b1ca3933 Mon Sep 17 00:00:00 2001 From: Mario <6395323+mario-huang@users.noreply.github.com> Date: Thu, 12 Sep 2024 00:01:43 +0800 Subject: [PATCH 7/9] no need engine --- javascript/durian.js/config.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/javascript/durian.js/config.yaml b/javascript/durian.js/config.yaml index f644abacc78..fb4b0f435df 100644 --- a/javascript/durian.js/config.yaml +++ b/javascript/durian.js/config.yaml @@ -2,9 +2,6 @@ framework: github: mario-huang/durian.js version: 1.0.0 - engines: - - bun - bootstrap: - bun install From 72d68eca6d485bdda6eb4cb10e3ce60753e8222f Mon Sep 17 00:00:00 2001 From: Mario <6395323+mario-huang@users.noreply.github.com> Date: Thu, 12 Sep 2024 00:09:56 +0800 Subject: [PATCH 8/9] it seem that I can not change command --- javascript/durian.js/cluster.ts | 3 +++ javascript/durian.js/config.yaml | 4 ++-- javascript/durian.js/src/app.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 javascript/durian.js/cluster.ts diff --git a/javascript/durian.js/cluster.ts b/javascript/durian.js/cluster.ts new file mode 100644 index 00000000000..046e5ca1864 --- /dev/null +++ b/javascript/durian.js/cluster.ts @@ -0,0 +1,3 @@ +import { bootstrap } from "./src/app"; + +bootstrap(); \ No newline at end of file diff --git a/javascript/durian.js/config.yaml b/javascript/durian.js/config.yaml index fb4b0f435df..8edd12153ae 100644 --- a/javascript/durian.js/config.yaml +++ b/javascript/durian.js/config.yaml @@ -1,8 +1,8 @@ framework: github: mario-huang/durian.js version: 1.0.0 + engines: + - bun bootstrap: - bun install - - command: bun run start \ No newline at end of file diff --git a/javascript/durian.js/src/app.ts b/javascript/durian.js/src/app.ts index f1261832e6f..4f83328cf8e 100644 --- a/javascript/durian.js/src/app.ts +++ b/javascript/durian.js/src/app.ts @@ -5,5 +5,5 @@ export async function bootstrap() { const app = await NestFactory.create(AppModule); await app.listen(3000); } -bootstrap(); + From 5f34f8628aba879e6d5777cc096c6f32bf4ac3b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marwan=20Rabb=C3=A2a?= Date: Sat, 14 Sep 2024 09:23:58 +0200 Subject: [PATCH 9/9] Updatypo on version --- javascript/durian.js/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/durian.js/config.yaml b/javascript/durian.js/config.yaml index 8edd12153ae..03d585c4812 100644 --- a/javascript/durian.js/config.yaml +++ b/javascript/durian.js/config.yaml @@ -1,6 +1,6 @@ framework: github: mario-huang/durian.js - version: 1.0.0 + version: 1.0 engines: - bun