Skip to content

Instantly share code, notes, and snippets.

View christopheranderson's full-sized avatar
🪐
Making the Cosmos (DB) better

Christopher Anderson christopheranderson

🪐
Making the Cosmos (DB) better
View GitHub Profile
@christopheranderson
christopheranderson / FunctionBotRun.csx
Last active October 22, 2022 17:09 — forked from ahelland/FunctionBotRun.csx
An Azure Function implementing the Microsoft Bot Framework to return random quotes
using System.Net;
using Microsoft.Bot.Connector;
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log)
{
log.Verbose($"C# HTTP trigger function processed a request. RequestUri={req.RequestUri}");
var msg = await req.Content.ReadAsAsync<Message>();
@christopheranderson
christopheranderson / Program.cs
Last active January 15, 2025 03:15 — forked from alaye-ms/Program.cs
Using a different image for Aspire CosmosDB emulator
var builder = DistributedApplication.CreateBuilder(args);
var database = builder.AddAzureCosmosDB("cosmos").AddDatabase("iotdb")
//.RunAsEmulator()
.WithEndpoint(name: "emulator", targetPort: 8080)
.WithAnnotation(new ContainerImageAnnotation
{
Registry = "<registry name>",
Image = "<image name>",
Tag = "<tag>"