Skip to content

Commit

Permalink
docs(readme & www): added some fixes and better description for azure
Browse files Browse the repository at this point in the history
  • Loading branch information
H4ad committed Jul 16, 2022
1 parent d09fc59 commit 682b406
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[![Semantic Release][semantic-release-img]][semantic-release-url]

Run REST APIs and other web applications using your existing Node.js application framework (Express, Koa, Hapi,
Fastify and tRPC), on top of AWS Lambda, Huawei and many other clouds.
Fastify and tRPC), on top of AWS Lambda, Azure, Huawei and many other clouds.

This library was a refactored version of [@vendia/serverless-express](https://github.com/vendia/serverless-express), I
create a new way to interact and extend event sources by creating contracts to abstract the integrations between each
Expand Down
9 changes: 8 additions & 1 deletion www/docs/main/handlers/azure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ import { PromiseResolver } from '@h4ad/serverless-adapter/lib/resolvers/promise'
import { HttpTriggerV4Adapter } from '@h4ad/serverless-adapter/lib/adapters/azure';
import app from './app';

export const handler = ServerlessAdapter.new(app)
export default ServerlessAdapter.new(app)
.setHandler(new AzureHandler())
.setResolver(new PromiseResolver())
// continue to set the other options here.
Expand All @@ -83,6 +83,13 @@ export const handler = ServerlessAdapter.new(app)
.build();
```

:::caution

Be careful when exporting the handler because in azure you must `export default` and in [DefaultHandler](./default)
you must `export const handler`.

:::

The above code will add support for Azure Http Trigger V4, to learn more about Http Trigger, see the [adapter docs](../adapters/azure/http-trigger-v4).

:::caution Attention
Expand Down
2 changes: 1 addition & 1 deletion www/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const config = {
title: 'Serverless Adapter',
tagline:
'Run REST APIs and other web applications using your existing Node.js application framework (NestJS, Express, Koa, Hapi, Fastify and many others), on top of AWS, Huawei and many other clouds.',
'Run REST APIs and other web applications using your existing Node.js application framework (NestJS, Express, Koa, Hapi, Fastify and many others), on top of AWS, Azure, Huawei and many other clouds.',
url: 'https://h4ad.github.io/serverless-adapter',
baseUrl: '/serverless-adapter/',
onBrokenLinks: 'throw',
Expand Down
4 changes: 2 additions & 2 deletions www/src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const FeatureList: FeatureItem[] = [
title: 'One library, many Serverless environments',
description: (
<>
We currently support AWS and Huawei, but in the future we will add
support for Azure, GCP and many other serverless environments.
We currently support AWS, Azure and Huawei, but in the future we will add
support for GCP and many other serverless environments.
</>
),
},
Expand Down

0 comments on commit 682b406

Please sign in to comment.