Learning Materials
A simple introduction to Node is available at this link. Just watch the first video in the series.
Be aware of this descriptive introduction to Node, by our staff member Frank. There are a number of sections that are too technical for now, but you may want to refer to it in the future.
Watch the first 1:45:57 of this video. As the instructor creates node programs, you duplicate his work. As you do, you create a number of small programs. The instructor creates a program as app.js, copies it to a new name, and then starts over again with a new app.js.
Assignments
Coding Assignment
You should already have done the steps described in the getting started page here. That page describes how to get git, the VSCode Editor, Node, and Postman. All of those should be installed when you start this lesson.
The next step is to do a git fork of your starter repository for this lesson, which is found here. The fork button is on the upper right of that page. Once the fork is complete, you clone your fork. Please don’t clone the original repository, as if you do that, you will not be able to push your work to github.
You do all of your work inside the directory created by the git clone, which is node-express-course. Change directories so that you are inside that directory. Then create the branch for this week, using the command
git checkout -b week1
Now change the directory to the one that says 01-node-tutorial. Then do:
mkdir answers
cp -r content answers
to create an answers directory within the node-express-course/01-node-tutorial directory, and to create also the content directory and files within it. The answers directory is where you put your work for this part of the lesson. As you do, you create a number of small programs. Be sure to put them inside the answers directory. The programs you create for this lesson are:
- 01-intro.js
- 02-globals.js
- 03-modules.js
- 04-names.js
- 05-utils.js
- 06-alternative-flavor.js
- 07-mind-grenade.js
- 08-os-module.js
- 09-path-module.js
- 10-fs-sync.js
- 11-fs-async.js
- 12-http.js
These programs are also in the node-express-course/01-node-tutorial directory, so you can check the answers if you get stuck — but this first lesson is easy, so you shouldn’t get stuck.
Mindset Assignment
No Mindset Assignment for your first week! Just get comfortable finding your way around the class page, github, etc. Don’t forget to reach out to mentors/classmates/Class Coordinator if you need help getting settled in this week!
Submitting Your Work
When you are done, do the following to submit your work:
git add -A
git commit -m "answers for lesson 1"
git push origin week1
Then go to your github repository — the one you created with a fork. Create a pull request. The target of the pull request should be the main branch of the repository you created. Once you have created the pull request, you submit your link to the pull request using the submission form link in the next paragraph.
When you’ve completed your Coding Assignment (reminder there is no Mindset Assignment this week) submit all of your work using:
Alpaca class use: | Squibby 2.0 Assignment Submission Form |
Baboon and any 2023 classes use: | Homework Assignment Submission Form |
Note: Once an assignment has been reviewed, you may want to merge it into the main branch. You should not do this until your pull request has been reviewed, as the reviewer may recommend changes. The merge process is done on Github: You select the pull request and merge it. Then, on your workstation, do a git checkout of the main branch and a git pull.
Once you do your git pull, do not merge it until your assignment reviewer has reviewed it. Your reviewer may request changes. You make these changes to the same branch, add and commit them, and then push that same branch so that the changes are added to your pull request. Once your reviewer has approved your pull request, then you merge it. Each week, create your new branch from the branch for the previous lesson, so that your lessons build on one another.