Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/manekinekko/nest-azure-function-example

Azure Functions integration with NestJS
https://github.com/manekinekko/nest-azure-function-example

azure azure-functions cloud nestjs

Last synced: 12 days ago
JSON representation

Azure Functions integration with NestJS

Awesome Lists containing this project

README

        

## Azure Functions + NestJS

- Getting started:
- `nest new my-cool-app`
- `npm start`
- `curl http://localhost:3000/`
- `nest add @nestjs/azure-func-http`
- `npm run start:azure`
- `curl http://localhost:7071/api`
- `nest generate controller contact`

```
import { Controller, Get } from '@nestjs/common';

@Controller()
export class ContactController {

@Get('contact')
getContact(): string {
return 'Hello Contact';
}
}
```
- `curl http://localhost:7071/api/contact`
- deploy to Azure
- `curl https://nest-azure-function.azurewebsites.net/api/contact`

- Full tutorial: https://trilon.io/blog/deploy-nestjs-azure-functions
- Learn more: https://nitr.ooo

## Roadmap

- Add `@AzureFunction()` annotation (see [@nestjs/azure-serverless](https://github.com/nestjs/azure-serverless)).