-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
layout: page | ||
title: Working with REST / OpenAPI | ||
nav_exclude: true | ||
--- | ||
# REST Transcript Activity | ||
|
||
In this activity, you will use TSOA to build a REST client for our transcript database. | ||
|
||
As usual, download the [starter code]({{ site.baseurl }}{% link Activities/module11-rest-transcript-activity.zip %}) and run `npm install`. | ||
|
||
Then, run `npm start` to generate the OpenAPI specification, server boilerplate, and start the development server. | ||
This command will automatically reload the server as you change files in this project. | ||
To stop the server, press control-C in the terminal. | ||
|
||
Once you see the message "Listening on 8081", you can access this URL in your browser: | ||
[http://localhost:8081/docs/#/transcript](http://localhost:8081/docs/#/transcript) | ||
|
||
You should now see a "Swagger" transcript-server-openapi documentation page, with a few API endpoints defined. Expand the "GET /transcripts" endpoint, click "Try it out", and then "Execute". Now, the field "Response Body" should have text in it like: | ||
``` | ||
[ | ||
{ | ||
"student": { | ||
"studentID": 1, | ||
"studentName": "avery" | ||
}, | ||
"grades": [ | ||
{ | ||
"course": "DemoClass", | ||
"grade": 100 | ||
}, | ||
{ | ||
"course": "DemoClass2", | ||
"grade": 100 | ||
} | ||
] | ||
}, | ||
``` | ||
|
||
This demonstrates that this endpoint of your REST API is functional. In the rest of the activity, you will implement the remainder of the routes. Details are in the README page of the starter code. | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
layout: module | ||
title: "11 - Distributed Systems (Part 2)" | ||
permalink: /modules/11-distributed-systems-2 | ||
parent: Modules | ||
nav_order: 11 | ||
lessons: | ||
- title: "Distributing Processing" | ||
ppt: "Module 11.1 Distributing Processing.pptx" | ||
pdf: "Module 11.1 Distributing Processing.pdf" | ||
- title: "Case Studies" | ||
ppt: "Module 11.2 Case Studies.pptx" | ||
pdf: "Module 11.2 Case Studies.pdf" | ||
- title: "Communicaton Patterns" | ||
ppt: "Module 11.3 Communication Patterns.pptx" | ||
pdf: "Module 11.3 Communication Patterns.pdf" | ||
--- | ||
### Learning Objectives: | ||
In this module, you will learn to: | ||
* Recognize common software architectures | ||
* Understand tradeoffs of scalability, performance, and fault tolerance between these architectures | ||
* Explain the basic principles of the REST and WebSocket communication patterns | ||
|
||
|
||
{% include lesson.html %} | ||
|
||
### Activity | ||
* Activity: [Transcript REST Server]({{ site.baseurl }}{% link Activities/Module11 REST Activity.md %}) | ||
|
||
|
||
### Resources | ||
* ["Distributed Systems for Fun and Profit"](http://book.mixu.net/distsys/index.html) by Mikito Takada | ||
* Online book chapter: ["Thinking Like a Software Architect"](https://ckaestne.medium.com/thinking-like-a-software-architect-121ea6919871) by Christian Kästner | ||
* Podcast: ["Chris Richardson on Microservice Patterns"](https://www.se-radio.net/2019/06/episode-370-chris-richardson-on-microservice-patterns/) - SE Radio | ||
* Counterpoint podcast: ["Roberta Arcoverde on Stack Overflow's Monolith"](https://hanselminutes.com/847/engineering-stack-overflow-with-roberta-arcoverde) | ||
* ["What is a REST API?"](https://www.sitepoint.com/rest-api/) | ||
* [Socket.io](https://socket.io/) - a library for real-time web applications |