From 1f7b8a709e8fa24533902465986111e73e298699 Mon Sep 17 00:00:00 2001 From: Thada Wangthammang Date: Fri, 1 Mar 2024 21:04:06 +0700 Subject: [PATCH] doc: update readme --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fbd5b82a..d7e0531f 100644 --- a/README.md +++ b/README.md @@ -46,10 +46,12 @@ npm install @nammatham/core @nammatham/azure-functions @nammatham/express You can see [examples](examples) or follow the minimal app getting started below: +> `initNammatham.create()` is a factory function for creating Nammatham App, it's a wrapper for Azure Functions App. + ```typescript -import { initNammatham, AzureFunctionsAdapter, expressPlugin } from "nammatham"; +import { initNammatham, expressPlugin } from "nammatham"; -const n = initNammatham.create(new AzureFunctionsAdapter()); +const n = initNammatham.create(); const func = n.func; const app = n.app; @@ -57,7 +59,7 @@ const helloFunction = func .httpGet('hello', { route: 'hello-world', }) - .handler(async ({trigger, context}) => { + .handler(async ({ trigger, context }) => { context.log('HTTP trigger function processed a request.'); context.debug(`Http function processed request for url "${trigger.url}"`); const name = trigger.query.get('name') || (await trigger.text()) || 'world';