Skip to content

Commit 4ec7a6f

Browse files
committed
improved readme
1 parent fea7b70 commit 4ec7a6f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ Taxonomies for products and languages: https://review.docs.microsoft.com/new-hop
2828

2929
Serverless Full Stack implementation on Azure of [TodoMVC](http://todomvc.com/) app with support both for REST and GraphQL endpoints via [Prisma](https://www.prisma.io/)
3030

31+
This sample is a variation of the Full-Stack MVC Todo sample described here: [TodoMVC Full Stack with Azure Static Web Apps, Node and Azure SQL](https://devblogs.microsoft.com/azure-sql/todomvc-full-stack-with-azure-static-web-apps-node-and-azure-sql/). The difference, of course, is the use of Prisma to have **a model-first approach and to support both the REST and GraphQL endpoints**.
32+
33+
This means you can use Typescript to query your database and Prisma will take care of generating and executing the correct SQL query. This way you can focus on creating amazing solution while still having all the power and the feature of Azure SQL at your service. Just like magic!
34+
35+
![Architecture](./assets/architecture.png)
36+
3137
## Azure Static WebApps, Azure Functions, Node and Azure SQL
3238

3339
The implementation uses
@@ -41,10 +47,6 @@ The implementation uses
4147
- [Azure SQL](https://azure.microsoft.com/en-us/services/sql-database/) as database to store ToDo data
4248
- [GitHub Actions](https://github.com/features/actions) to Deploy the full-stack website (thanks to Azure Static Web Apps)
4349

44-
## Implementation Details
45-
46-
This sample is a variation of the Full-Stack MVC Todo sample described here: [TodoMVC Full Stack with Azure Static Web Apps, Node and Azure SQL](https://devblogs.microsoft.com/azure-sql/todomvc-full-stack-with-azure-static-web-apps-node-and-azure-sql/). The difference, of course, is the use of Prisma to have a model-first approach and to support both the REST and GraphQL endpoints.
47-
4850
## Folder Structure
4951

5052
- `/api`: the NodeJs Azure Function code used to provide the backend API, called by the Vue.Js client.
@@ -207,12 +209,12 @@ curl -s -X GET https://[your-swa-name].azurestaticapps.net/api/todo/123
207209
208210
Create a todo
209211
```
210-
curl -H "Content-Type: application/json" -s -X POST https://[your-swa-name].azurestaticapps.net/api/todo/ -d '{"title":"hello world"}'
212+
curl -s -H "Content-Type: application/json" -X POST https://[your-swa-name].azurestaticapps.net/api/todo/ -d '{"title":"Hello world"}'
211213
```
212214
213215
Update todo
214216
```
215-
curl -H "Content-Type: application/json" -X PUT https://[your-swa-name].azurestaticapps.net/api/todo/123 -d '{"title":"world, hello!", "completed":true}'
217+
curl -s -H "Content-Type: application/json" -X PUT https://[your-swa-name].azurestaticapps.net/api/todo/123 -d '{"title":"World, hello!", "completed":true}'
216218
```
217219
218220
Delete todo

assets/architecture.png

187 KB
Loading

0 commit comments

Comments
 (0)