I’ve selected some good materials to complement the lectures, problem sets, and programming projects; don’t skip them. (Short on time? Watch videos at 1.5x or faster.)
Please watch:
Please skim:
Please read:
ws module.You will be adding to repository you created earlier, ending up with the following structure:
.
├── README.md
├── .gitignore
├── homework1
│ └── Files for Homework 1
└── homework2/
├── short-answer-problems.md
└── javascript/
├── random_number_server.js
├── random_number_client.js
├── random_number_web_server.js
├── chat_server.js
└── chat.html
Submit your work as a GitHub Pull Request. Make sure the PR is produced by 23:59 in the America/Los Angeles time zone on the due date. (You can produce the PR by doing all your work on a branch, then clicking the New Pull Request button in GitHub.) I will grade by commenting on your PR.
Since your GitHub repo was set up in an earlier assignment, there are only a few things you need to do for this one.
node_modules and anything else that becomes necessary.
Make sure you use an IDE with a built-in linter or use VSCode or Atom with the proper plugins and linters. You are too experienced to be turning in un-linted code.
Write the answers to the following in nice markdown format and submit in short-answer-problems.md
In Comer, 5th edition, do problems 1-7, 9-23 at the end of Chapter 3.
Submit answers to the following, in your javascript folder. Please use a very recent version of Node. Write your code using very modern JavaScript; TypeScript is fine as well. If you are using Socket.IO, use version 2 or higher.
process.argv[2].(Submit in random_number_client.js.) /random endpoint, and delivers an HTML client at the / endpoint. The client must have a button to make a request: when clicked, the request is made and your app should display the response. You don’t have to spend a lot of time making the client beautiful, but a bit of effort (and perhaps humor) will be appreciated. (Submit in random_number_web_server.js and perhaps additional files, if you cannot stomach inline scripts.) You can do this in raw Node.js, or use a framework like Express./ that when sent to the server, do cool things. One of these should be /quit but think of others. Also, send nice error messages to clients (such as when the chat room is full) and make sure your server never crashes. (Submit in chat_server.js.)