Skip to content

Commit

Permalink
remove bootstrap option in durians config file, and change the one in… (
Browse files Browse the repository at this point in the history
#8074)

* remove bootstrap option in durians config file, and change the one in javascript/config.yaml to bun install --production

* fix: bootstrap

* fix: bun run build

* Update javascript/config.yaml

Co-authored-by: Marwan Rabbâa <waghanza@gmail.com>

* use bun run cluster.ts

* update dependencies

---------

Co-authored-by: Marwan Rabbâa <waghanza@gmail.com>
  • Loading branch information
mario-huang and waghanza authored Dec 25, 2024
1 parent 1f59f91 commit 3c01413
Show file tree
Hide file tree
Showing 15 changed files with 51 additions and 51 deletions.
4 changes: 2 additions & 2 deletions javascript/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ language:
command: node app.js
bun:
bootstrap:
- bun install
command: bun run cluster.ts
- bun install --production
command: bun run cluster.ts
files:
- bunfig.toml

Expand Down
18 changes: 0 additions & 18 deletions javascript/durian.js-fastify/cluster.ts

This file was deleted.

3 changes: 1 addition & 2 deletions javascript/durian.js-fastify/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ framework:
version: 1.1
engines:
- bun
bootstrap:
- bun install
command: bun run pm2
9 changes: 9 additions & 0 deletions javascript/durian.js-fastify/ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
apps: [
{
script: 'dist/main.js',
instances: "max",
exec_mode: 'cluster',
},
],
};
5 changes: 4 additions & 1 deletion javascript/durian.js-fastify/nest-cli.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"entryFile": "app"
"compilerOptions": {
"deleteOutDir": true
}
}
10 changes: 7 additions & 3 deletions javascript/durian.js-fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
],
"scripts": {
"build": "durian build",
"pm2": "bun run build && pm2-runtime start ecosystem.config.js",
"start": "durian start",
"start:debug": "durian start:debug",
"start:dev": "durian start:dev",
Expand All @@ -32,7 +33,10 @@
"test:e2e": "durian test:e2e"
},
"dependencies": {
"durian.js": "~1.1.0",
"@nestjs/platform-fastify": "~10.4.0"
"durian.js": "^1.2.1",
"@nestjs/platform-fastify": "^10.4.15",
"@fastify/static": "^8.0.3",
"@fastify/view": "^10.0.1",
"pm2-beta": "^6.0.2"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export async function bootstrap() {
);
await app.listen(3000, "0.0.0.0");
}

bootstrap();
4 changes: 4 additions & 0 deletions javascript/durian.js-fastify/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
}
18 changes: 0 additions & 18 deletions javascript/durian.js/cluster.ts

This file was deleted.

3 changes: 1 addition & 2 deletions javascript/durian.js/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ framework:
version: 1.1
engines:
- bun
bootstrap:
- bun install
command: bun run pm2
9 changes: 9 additions & 0 deletions javascript/durian.js/ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
apps: [
{
script: 'dist/main.js',
instances: "max",
exec_mode: 'cluster',
},
],
};
5 changes: 4 additions & 1 deletion javascript/durian.js/nest-cli.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"entryFile": "app"
"compilerOptions": {
"deleteOutDir": true
}
}
6 changes: 4 additions & 2 deletions javascript/durian.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
],
"scripts": {
"build": "durian build",
"pm2": "bun run build && pm2-runtime start ecosystem.config.js",
"start": "durian start",
"start:debug": "durian start:debug",
"start:dev": "durian start:dev",
Expand All @@ -32,6 +33,7 @@
"test:e2e": "durian test:e2e"
},
"dependencies": {
"durian.js": "~1.1.0"
"durian.js": "^1.2.0",
"pm2-beta": "^6.0.2"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export async function bootstrap() {
const app = await NestFactory.create(AppModule);
await app.listen(3000);
}

bootstrap();

4 changes: 4 additions & 0 deletions javascript/durian.js/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
}

0 comments on commit 3c01413

Please sign in to comment.