The simplest way to build and deploy Serverless NodeJS backends on Azure.
Nitro is a heavily opinionated template for building applications in the NestJS Framework, the fastest-growing NodeJS framework in the world:
- Serverless Database support with Azure Table Storage.
- Serverless File Upload with Azure Blob Storage.
- Serverless Hosting with Azure Functions.
Effortlessly Scalable. Nitro applications are Serverless, they scale automatically and you only pay for what you use. From the website hosting, to file-upload to the database, all parts of a Nitro stack scale.
Large Ecosystem A NestJS application sits on either express or fastify (you choose) with access to both platforms diverse ecosystem of modules and packages.
GraphQL and Rest No need to choose upfront, a NestJS application allows you to expose entities as either a series of Rest endpoints or a single GraphQL endpoint.
❤ Azure Your gateway to over 100 Azure cloud services.
To get started with the Nitro Stack, you need to install the following packages:
And the Hexa CLI (read more about Hexa):
npm install --global @nestjs/cli
npm install --global @manekinekko/hexa
A Nitro application is just a NestJS application with Serverless support on Azure. So to begin create a NestJS application
nest new nitro-cats cd nitro-cats nest run start
Deploy as a Serverless app
To deploy as a serverless application on Azure you first need to add the
nest add @nestjs/azure-func-http module, this converts your NestJS application to a Serverless Azure Function.
nest add @nestjs/azure-func-http ✔ 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)
We need to build a home for our application in the Cloud, to do that we use Hexa. Hexa is a CLI tool to help you easily create and manage resources on the Azure platform:
hexa init --just functions
Finally, watch Hexa deploy your Nest application to Azure Functions!
- How to deploy a NestJS application on Azure Serverless Functions?
- How to add Azure Serverless NoSQL Database support to NestJS?
- View the Nitro-Cats Demo project on GitHub