Cadl End-to-End Scenario
This repo contains the code and configuration for an end-to-end scenario for using Cadl to develop and deploy a full application.
Support libraries that enable the demo features are in the packages/
directory. The demo code itself is in the demo/
directory.
Instructions
Prerequisites
Install Node & NPM
Downlaod and install from https://nodejs.org.
Install az cli
Follow the instructions here.
Install azd (Azure Accelerators)
Follow the instructions here
Clone this repository
Clone this repository and cd into the root directory.
Install project dependencies & build
First, install our monorepo manager:
> npm install -g @microsoft/rush
Next, install the project's dependencies.
> rush install
Next, build the project.
> rush build
(Note that this step is only necessary for the demo and is not part of the experience)
Running the Demo
- Change your working directory to
./demo
, and open vscode in this directory. - Edit
app.cadl
if you'd like - Run
npm run build
which compiles the cadl to a variety of assets (openapi, bicep files, implementation stubs, clients, etc.) - Edit
./src/api/index.ts
and implement any function endpoints you've declared in your cadl file. - Edit your frontend code at
./src/web/build/index.html
. - Run
azd up
to deploy the application to the cloud.