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,31 @@
import { createBuilder } from './.modules/aspire.js';

const builder = await createBuilder();

const authToken = await builder.addParameterWithValue("ngrok-auth-token", "ngrok-token-value", { secret: true });

const upstream = await builder
.addContainer("upstream", "nginx:alpine")
.withHttpEndpoint({ name: "http", targetPort: 80 });

await builder
.addNgrok("ngrok-parameter", {
configurationFolder: ".ngrok-parameter",
endpointPort: 59600,
endpointName: "http",
configurationVersion: 3
})
.withAuthToken(authToken)
.withTunnelEndpoint(upstream, "http", {
ngrokUrl: "https://parameter.ngrok.test",
labels: {
environment: "dev",
service: "upstream"
}
});

const ngrokValue = builder.addNgrok("ngrok-value");
await ngrokValue.withAuthTokenValue("plain-text-token");
await ngrokValue.withTunnelEndpoint(upstream, "http");

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