Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { createBuilder } from './.modules/aspire.js';

const builder = await createBuilder();

// addBunApp — explicit working directory and entry point
const bunApp = await builder.addBunApp("bun-app", {
workingDirectory: "./bun-app",
entryPoint: "index.ts",
watch: false
});

// withBunPackageInstallation — default invocation
await bunApp.withBunPackageInstallation();
await bunApp.withBunPackageInstallation();

// addBunApp — exercise default entry point and watch values
const bunDefaults = await builder.addBunApp("bun-defaults", {
workingDirectory: "./bun-app"
});
await bunDefaults.withBunPackageInstallation();

// addBunApp — exercise watch mode
const bunWatch = await builder.addBunApp("bun-watch", {
workingDirectory: "./bun-app",
entryPoint: "index.ts",
watch: true
});
await bunWatch.withBunPackageInstallation();

await builder.build().run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"appHost": {
"path": "apphost.ts",
"language": "typescript/nodejs"
},
"profiles": {
"https": {
"applicationUrl": "https://localhost:29750;http://localhost:28931",
"environmentVariables": {
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:10975",
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:13319"
}
}
},
"packages": {
"CommunityToolkit.Aspire.Hosting.Bun": ""
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
console.log("bun-app ready");
setInterval(() => { }, 60_000);
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "bun-app",
"version": "1.0.0",
"type": "module"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// @ts-check

import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';

export default defineConfig({
files: ['apphost.ts'],
extends: [tseslint.configs.base],
languageOptions: {
parserOptions: {
projectService: true,
},
},
rules: {
'@typescript-eslint/no-floating-promises': ['error', { checkThenables: true }],
},
});
Loading
Loading