You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/burger-api/README.md
+34-12Lines changed: 34 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
<divalign="center">
2
2
3
-
# Azure Functions Burger API
3
+
# Burger API (Azure Functions)
4
4
5
5
[](https://codespaces.new/Microsoft/mcp-agent-langchainjs?hide_repo_select=true&ref=main&quickstart=true)
@@ -25,14 +30,14 @@ The Burger API provides the following endpoints:
25
30
| GET | /api/openapi | Returns the OpenAPI specification in YAML format (add `?format=json` for JSON) |
26
31
| GET | /api/burgers | Returns a list of all burgers |
27
32
| GET | /api/burgers/{id} | Retrieves a specific burger by its ID |
28
-
| GET | /api/toppings | Returns a list of all toppings (can be filtered by category with ?category=X) |
33
+
| GET | /api/toppings | Returns a list of all toppings (can be filtered by category with `?category=X`) |
29
34
| GET | /api/toppings/{id} | Retrieves a specific topping by its ID |
30
35
| GET | /api/toppings/categories | Returns a list of all topping categories |
31
36
| GET | /api/orders | Returns a list of all orders in the system |
32
37
| POST | /api/orders | Places a new order with burgers (requires `userId`) |
33
38
| GET | /api/orders/{orderId} | Retrieves an order by its ID |
34
39
| DELETE | /api/orders/{orderId} | Cancels an order if it has not yet been started (status must be 'pending', requires `userId` as a query parameter (e.g., `?userId={userId}`) |
@@ -77,16 +82,9 @@ No manual API call is needed for these transitions.
77
82
78
83
## Development
79
84
80
-
### Setup development environment
81
-
82
-
You can run this project directly in your browser by using GitHub Codespaces, which will open a web-based VS Code.
85
+
### Getting started
83
86
84
-
1.[**Fork**](https://github.com/Microsoft/mcp-agent-langchainjs/fork) the project to create your own copy of this repository.
85
-
2. On your forked repository, select the **Code** button, then the **Codespaces** tab, and clink on the button **Create codespace on main**.
86
-

87
-
3. Wait for the Codespace to be created, it should take a few minutes.
88
-
89
-
If you prefer to run the project locally, follow [these instructions](../../README.md#use-your-local-environment).
87
+
Follow the instructions [here](../../README.md#getting-started) to set up the development environment for the entire Pizza MCP Agents project.
90
88
91
89
### Run the application
92
90
@@ -100,3 +98,27 @@ This command will start the Azure Functions application locally. You can test th
100
98
101
99
> [!NOTE]
102
100
> If you have not deployed the Azure resources, it will fall back to in-memory data. You can test the API without deploying it to Azure.
101
+
102
+
103
+
### Available Scripts
104
+
105
+
| Script | Description |
106
+
|--------|-------------|
107
+
|`npm start`| Start the development server with hot reload and Azurite storage emulator |
108
+
|`npm run build`| Build the TypeScript source |
109
+
|`npm run clean`| Clean build artifacts |
110
+
|`npm run start:storage`| Start local Azurite storage emulator |
111
+
|`update:local-settings`| Create or update `local.settings.json` needed by the Functions runtime |
112
+
113
+
### Configuration
114
+
115
+
The application uses environment variables for configuration:
116
+
117
+
| Variable | Description | Default |
118
+
|----------|-------------|---------|
119
+
|`AZURE_COSMOSDB_NOSQL_ENDPOINT`| Azure Cosmos DB endpoint |`""` (not set) |
120
+
|`AZURE_STORAGE_URL`| Azure Storage URL for images |`""` (not set) |
121
+
|`AZURE_STORAGE_CONTAINER_NAME`| Azure Storage container name for images |`""` (not set) |
122
+
123
+
> [!NOTE]
124
+
> When running locally without any configuration set, the API will automatically use in-memory storage for the database and file access for the images, and log this behavior.
Copy file name to clipboardExpand all lines: packages/burger-mcp/README.md
+28-9Lines changed: 28 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
5
5
[](https://codespaces.new/Microsoft/open-hack-build-25?hide_repo_select=true&ref=main&quickstart=true)
[](https://codespaces.new/Microsoft/open-hack-build-25?hide_repo_select=true&ref=main&quickstart=true)
[](https://codespaces.new/Azure-Samples/mcp-agent-langchainjs?hide_repo_select=true&ref=main&quickstart=true)
This web app provides a dashboard visualisation interface for the live orders made through the Burger API. This application is built using [Azure Static Web Apps](https://learn.microsoft.com/azure/static-web-apps/) and uses the Azure Functions Burger API to acess the data.
16
+
This website provides a dashboard visualisation interface for the live orders made through the Burger API. This application is built using [Azure Static Web Apps](https://learn.microsoft.com/azure/static-web-apps/) and uses the Azure Functions Burger API to acess the data.
You can run this project directly in your browser by using GitHub Codespaces, which will open a web-based VS Code.
24
+
-**Live orders dashboard**: Displays all current orders in real-time
25
+
-**Responsive design**: Optimized for both desktop and mobile devices
26
+
-**Static hosting**: Global content delivery through Azure Static Web Apps
21
27
22
-
1.[**Fork**](https://github.com/Microsoft/open-hack-build-25/fork) the project to create your own copy of this repository.
23
-
2. On your forked repository, select the **Code** button, then the **Codespaces** tab, and click on the button **Create codespace on main**.
24
-

25
-
3. Wait for the Codespace to be created, it should take a few minutes.
28
+
## Development
29
+
30
+
### Getting started
26
31
27
-
If you prefer to run the project locally, follow [these instructions](../../README.md#use-your-local-environment).
32
+
Follow the instructions [here](../../README.md#getting-started) to set up the development environment for the entire Burger MCP Agents project.
28
33
29
34
### Run the application
30
35
@@ -34,4 +39,25 @@ You can run the following command to run the application locally:
34
39
npm start
35
40
```
36
41
37
-
This command will start the [Vite](https://vitejs.dev/) development server and the Azure Functions emulator with the Burger API. This will allow you to test the web app locally, using the URL `http://localhost:5173`.
42
+
This command will start the [Vite](https://vitejs.dev/) development server and the Azure Functions emulator with the Burger API. This will allow you to test the website locally, using the URL `http://localhost:5173`.
43
+
44
+
### Available scripts
45
+
46
+
| Command | Description |
47
+
|---------|-------------|
48
+
|`npm start`| Start the web app server and the Functions emulator for the Burger API |
49
+
|`npm run start:mock`| Start the web app server with mocked data (useful for testing without the API) |
50
+
|`npm run dev`| Start only the Vite development server |
51
+
|`npm run build`| Build the application for production |
52
+
|`npm run preview`| Preview the production build locally |
53
+
|`npm run serve`| Start both the web app and API in development mode |
54
+
55
+
### Configuration
56
+
57
+
The application uses environment variables for configuration:
58
+
59
+
| Variable | Description | Default |
60
+
|----------|-------------|---------|
61
+
|`BURGER_API_URL`| Burger API base URL |`""` (auto-detected) |
62
+
63
+
For local development, this doesn't need to be set thanks to Vite development server proxying.
0 commit comments