Skip to content

Commit

Permalink
doc: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mildronize committed Mar 1, 2024
1 parent bd39d0d commit 1f7b8a7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,20 @@ 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;

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';
Expand Down

0 comments on commit 1f7b8a7

Please sign in to comment.