Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nestjs/azure-func-http

Azure Functions HTTP adapter for Nest framework (node.js) πŸŒ₯
https://github.com/nestjs/azure-func-http

azure javascript nest nestjs node-framework nodejs serverless typescript

Last synced: about 1 month ago
JSON representation

Azure Functions HTTP adapter for Nest framework (node.js) πŸŒ₯

Awesome Lists containing this project

README

        


Nest Logo

[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
[travis-url]: https://travis-ci.org/nestjs/nest
[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux
[linux-url]: https://travis-ci.org/nestjs/nest

A progressive Node.js framework for building efficient and scalable server-side applications.



NPM Version
Package License
NPM Downloads
Coverage
Discord
Backers on Open Collective
Sponsors on Open Collective



## Description

[Azure Functions](https://code.visualstudio.com/tutorials/functions-extension/getting-started) HTTP module for [Nest](https://github.com/nestjs/nest).

## Installation

Using the Nest CLI:

```bash
$ nest add @nestjs/azure-func-http
```

Example output:

```bash
βœ” Installation in progress... β˜•
CREATE /.funcignore (66 bytes)
CREATE /host.json (23 bytes)
CREATE /local.settings.json (116 bytes)
CREATE /proxies.json (72 bytes)
CREATE /main/function.json (294 bytes)
CREATE /main/index.ts (287 bytes)
CREATE /main/sample.dat (23 bytes)
CREATE /src/main.azure.ts (321 bytes)
UPDATE /package.json (1827 bytes)
```

## Tutorial

You can read more about this integration [here](https://trilon.io/blog/deploy-nestjs-azure-functions).

## Native routing

If you don't need the compatibility with `express` library, you can use a native routing instead:

```typescript
const app = await NestFactory.create(AppModule, new AzureHttpRouter());
```

`AzureHttpRouter` is exported from `@nestjs/azure-func-http`. Since `AzureHttpRouter` doesn't use `express` underneath, the routing itself is much faster.

## Additional options

You can pass additional flags to customize the post-install schematic. For example, if your base application directory is different than `src`, use `--rootDir` flag:

```bash
$ nest add @nestjs/azure-func-http --rootDir app
```

Other available flags:

- `rootModuleFileName` - the name of the root module file, default: `app.module`
- `rootModuleClassName` - the name of the root module class, default: `AppModule`
- `skipInstall` - skip installing dependencies, default: `false`

## Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).

## Stay in touch

- Author - [Kamil MyΕ›liwiec](https://twitter.com/kammysliwiec)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)

## License

Nest is [MIT licensed](LICENSE).