-
Notifications
You must be signed in to change notification settings - Fork 146
Documentation/routing with servers #622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Documentation/routing with servers #622
Conversation
Oliver-Quail
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve this PR pending confirmation of testing of OOP code
| - [x] The tutorial is free of spelling and grammatical errors. | ||
| - [x] The tutorial is easy to follow. | ||
| - [x] The tutorial has: | ||
| - [x] C# using top level statements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking. It seems from your write up you tested C# code (Object-Oriented Programming) didn't you?
If so please add this to the check list as it was a task requirement to review this code as well
| @@ -0,0 +1 @@ | |||
| contributors:Runqi Liu, Haoyu Liu,Wei Zhang | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this file is necessary
Oliver-Quail
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requested changes have been made.
I approve this PR
A tutorial review of the tutorial has been done. Modified part of the text description of the sentence to make the content more coherent and clear. The code in this tutorial has been run to ensure that it works and outputs the results.In the HTML file, I added some elements myself to make the page more perfect and easier to operate.
Checks done:
Tested in latest Chrome
Tested in latest Firefox
npm run build
npm run preview
Code Checks:
Checked C#
Checked C++
Checked Python
Code output results:
Prat one

Create a new project folder and enter that folder. We need to set up a resources folder to store the files we want to 'provide services' for. We need to run 'skm resources' in the terminal.
C++
PY

C#

result

Part two

Based on the last time, this uses the next_web_request function to get the next server request, and depending on whether it is obtained, selectively redirects the page to the login page or the homepage (while also using the skm sources command to create a sources file, placing index.html and login.html in the file).
C++
PY

C#

Part three

Based on the documents in the second part, we use a while loop to obtain multiple requests and navigate them to different pages. The function ISGetRequestFor is used to determine if the corresponding request has been received. During this process, a problem was found: for /quit, the server exits directly without giving any prompt, which may confuse users in real use. In practice, we could add a prompt.
C++
PY

C#

C#

Result



