The course was designed for the Generation Thailand JSD Program. It is a one-week course for the students to learn the basic of Node.js and Express.js.
- Clone this repository to your local machine.
git clone [email protected]:scallops-cloud/nodejs-basic-course.git
- Checkout a new branch to work on, to avoid the conflict with the new workshop update. (You may use other branch name you prefer.)
cd nodejs-basic-course
git checkout -b exercise-work
-
Check the slide if available for the exercise, then try to work on the code in the exercise folder.
-
Commit once you are done to save the changes. Check the solution to compare the result.
- Node-0: Node.js Introduction
- Node-1: NodeJS Read & Write File for exercise 01-01
- Node-2: NodeJS Arguments for exercise 01-02 & 01-03
https://github.com/scallops-cloud/nodejs-basic-course/tree/main/01-node-intro/exercises
- Express-1: Express.js Introduction for exercise 03-01
- Express-2: Basic Router for exercise 03-02 & 03-03
- Express-3: Middleware for exercise 03-06
https://github.com/scallops-cloud/nodejs-basic-course/tree/main/03-express-intro/exercises
https://github.com/scallops-cloud/nodejs-basic-course/tree/main/05-crud-rest-api/exercises
- AUTH-1: Encryption & Hashing
- AUTH-2: Intro to Express.js Authentication for exercise 06-01 & 06-02
- AUTH-3: JWT & Protected Routes for exercise 06-03 & 06-04
https://github.com/scallops-cloud/nodejs-basic-course/tree/main/06-authentication/exercises
- Ensure we are at the working branch ex.
exercise-work
. And no uncommitted changes.
git status
Expected result:
On branch exercise-work
nothing to commit, working tree clean
- If the branch is not clean, commit all existing uncommitted changes first.
git add .
git commit -m "Day 1's work"
- Checkout main branch.
git checkout main
- Pull the new changes
git pull
- Switch back to working branch (can be other branch name you used).
git checkout exercise-work
- Merge the new change to the
exercise-work
branch.
git merge main
-
Fork this repository to your own account.
-
Check the remote repository.
git remote -v
Expected result:
origin [email protected]:scallops-cloud/nodejs-basic-course.git (fetch)
origin [email protected]:scallops-cloud/nodejs-basic-course.git (push)
- Add your own repository as a remote repository.
git remote add myrepo YOUR_GITHUB_REPO_URL
For example:
git remote add myrepo [email protected]:turboza/nodejs-basic-course.git
- Push the working branch to your own repository.
git push myrepo exercise-work