Skip to content
Open
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,26 @@
import { createBuilder } from './.modules/aspire.js';

const builder = await createBuilder();

const umamiSecret = await builder.addParameterWithValue("umami-secret", "SuperSecret123!", { secret: true });
const postgres = await builder.addPostgres("postgres");
const analyticsDatabase = await postgres.addDatabase("analytics");

// addUmami — with explicit secret and port
const umami = await builder.addUmami("umami", {
secret: umamiSecret,
port: 31300
});

// addUmami — minimal overload
const umamiDefault = await builder.addUmami("umami-default");

// withPostgreSQL — configure the PostgreSQL backend
await umami.withPostgreSQL(analyticsDatabase);
await umamiDefault.withPostgreSQL(analyticsDatabase);

// Property access on UmamiResource (ExposeProperties = true)
const umamiResource = await umami;
const _primaryEndpoint = await umamiResource.primaryEndpoint.get();

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.Umami": ""
}
}
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