My Dev Diary: Season 1 - TheEvergreenStateCollege/upper-division-cs-23-24 GitHub Wiki

Video Presentation showcasing how it works

SOS part 2(SC, AI, OS)

Tuesday, March 12, 2024

I was working with Paul and we tried to solve the sign-in with a bearer token. During the way, we did trials and errors and transitioned to WSL, on the way we encountered this error about the User.ts properties not being readable

TypeError: Cannot read properties of undefined (reading 'username')
    at /home/chikathetougemaster/upper-division-cs-2024/web-24wi/projects/Duck/dist/src/handlers/user.js:52:67
    at step (/home/chikathetougemaster/upper-division-cs-2024/web-24wi/projects/Duck/dist/src/handlers/user.js:33:23)
    at Object.next (/home/chikathetougemaster/upper-division-cs-2024/web-24wi/projects/Duck/dist/src/handlers/user.js:14:53)
    at /home/chikathetougemaster/upper-division-cs-2024/web-24wi/projects/Duck/dist/src/handlers/user.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/chikathetougemaster/upper-division-cs-2024/web-24wi/projects/Duck/dist/src/handlers/user.js:4:12)
    at findUser (/home/chikathetougemaster/upper-division-cs-2024/web-24wi/projects/Duck/dist/src/handlers/user.js:47:12)
    at /home/chikathetougemaster/upper-division-cs-2024/web-24wi/projects/Duck/dist/src/handlers/user.js:110:29
    at step (/home/chikathetougemaster/upper-division-cs-2024/web-24wi/projects/Duck/dist/src/handlers/user.js:33:23)
    at Object.next (/home/chikathetougemaster/upper-division-cs-2024/web-24wi/projects/Duck/dist/src/handlers/user.js:14:53)

It turns out I haven't saved the file after this fix and also because I gave a null response to the function. here is what it is before

async function findUser(username: string) {
  const result = await prisma.user.findUnique({
    where: { username: request.body.username },
  });

  if (result === null) return undefined;

  return result;
};

and this is what I changed after.

async function findUser(username: string) {
  const result = await prisma.user.findUnique({
    where: { username },
  });

  if (result === null) return undefined;

  return result;
};

req is defined on this line https://github.com/TheEvergreenStateCollege/upper-division-cs/blob/main/web-24wi/projects/Duck/src/handlers/user.ts#L47

request.body.username is used for this line https://github.com/TheEvergreenStateCollege/upper-division-cs/blob/main/web-24wi/projects/Duck/src/handlers/user.ts#L7

I realize that it doesn't work because the Express request wasn't inside the scope of the findUser function and the request wasn't defined anywhere on this file

I later encountered a problem during sign-in, it seems that the sign-in signup wasn't working. Therefore I asked Quinn for help and he pointed out that my if statement is compromised both as the res.sendFile function needs a special file parameter but it won't able to find it because I sent an Object instead, which is not one of the type and the if function doesn't working because I intercept the parameter in the wrong place and that it just went through with the wrong outcome, there's also another problem I encounter later on using sign-in which I realize that it has been conflicted with the previous handmade localStorage save system while I substitute it with my database call

After I rest for a while and come back, it gets a new error again. god forbid me to be successful in something important, even if it's a last-minute change

it turns out that when my laptop got reset, it resets the autossh connection. I just need to turn on the ssh command again, later on, I substitute it with a background-implemented one

The Start

Today I woke up and tried to solve the problem that I got yesterday night about the conditions in this code executing the wrong way. For more information, when I run this code

// Check if user exists and password matches
if (userData && userData.hasOwnProperty(loginEmail) && userData[loginEmail] === loginPassword) {
    alert("login successful")
    // Redirect or perform any other action after successful login
} else {
    alert("Invalid login and password")
}

Turns out there's also another listen that's currently active alongside my code which makes it error-prone because the server itself listens to 2 different things at the same time. Paul Swish shows me another way to make it easier without stacking alert

This evening, Paul gathers us again for his office hour last check before Thursday's main demo day. We help each other with our work, making each of me, Torsten, and Riley server's running. We also did the disaster server scenario again to let Riley share with Torsten's server after he couldn't log in, from there, we both set our separate servers inside the Nginx and made our server running

In progress...

I think this is how you can commit things without being stuck in the main branch, at least that helps me late night doing all of this work

chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git merge origin/branch
Merge made by the 'ort' strategy.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push
fatal: The current branch branch has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin branch

chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push --set-upstream origin branch
Enumerating objects: 130, done.
Counting objects: 100% (118/118), done.
Delta compression using up to 8 threads
Compressing objects: 100% (95/95), done.
Writing objects: 100% (98/98), 2.16 MiB | 925.00 KiB/s, done.
Total 98 (delta 17), reused 6 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (17/17), completed with 7 local objects.
To https://github.com/TheEvergreenStateCollege/upper-division-cs.git
   986d73cc..07a59457  branch -> branch
Branch 'branch' set up to track remote branch 'branch' from 'origin'.

Part 2

After the project, I went back home and thought about adding an extra feature, but on the way, I encountered an error about committing git, I don't have much to say so I left the whole stack trace here. I mostly forgot about what happened but I think it's related to the git commit problem, either it's a detached head or I just have a bunch of things

chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push -u AkinaSS-myownthing main
fatal: 'AkinaSS-myownthing' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push -u main
fatal: 'main' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push -u upstream main
Enumerating objects: 105, done.
Counting objects: 100% (105/105), done.
Delta compression using up to 8 threads
Compressing objects: 100% (87/87), done.
Writing objects: 100% (89/89), 2.16 MiB | 1019.00 KiB/s, done.
Total 89 (delta 10), reused 6 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (10/10), completed with 7 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: Changes must be made through a pull request.
To https://github.com/TheEvergreenStateCollege/upper-division-cs/
 ! [remote rejected]   main -> main (protected branch hook declined)
error: failed to push some refs to 'https://github.com/TheEvergreenStateCollege/upper-division-cs/'
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push -u upstream Akina-myownthing
error: src refspec Akina-myownthing does not match any
error: failed to push some refs to 'https://github.com/TheEvergreenStateCollege/upper-division-cs/'
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push origin AkinaSS-myownthing:main
To https://github.com/TheEvergreenStateCollege/upper-division-cs.git
 ! [rejected]          AkinaSS-myownthing -> main (non-fast-forward)
error: failed to push some refs to 'https://github.com/TheEvergreenStateCollege/upper-division-cs.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git pull
remote: Enumerating objects: 28, done.
remote: Counting objects: 100% (28/28), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 28 (delta 9), reused 28 (delta 9), pack-reused 0
Unpacking objects: 100% (28/28), 8.30 KiB | 1.38 MiB/s, done.
From https://github.com/TheEvergreenStateCollege/upper-division-cs
 * [new branch]        wshine-week10 -> origin/wshine-week10
Already up to date.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push origin AkinaSS-myownthing:main
To https://github.com/TheEvergreenStateCollege/upper-division-cs.git
 ! [rejected]          AkinaSS-myownthing -> main (non-fast-forward)
error: failed to push some refs to 'https://github.com/TheEvergreenStateCollege/upper-division-cs.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git checkout AkinaSS-myownthing 
Switched to branch 'AkinaSS-myownthing'
Your branch is up to date with 'upstream/AkinaSS-myownthing'.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push -u origin AkinaSS-myownthing
Branch 'AkinaSS-myownthing' set up to track remote branch 'AkinaSS-myownthing' from 'origin'.
Everything up-to-date
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git main
git: 'main' is not a git command. See 'git --help'.

The most similar command is
        mailinfo
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git switch main
Switched to branch 'main'
Your branch is ahead of 'origin/main' by 1 commit.
  (use "git push" to publish your local commits)
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git checkout AkinaSS-myownthing 
Switched to branch 'AkinaSS-myownthing'
Your branch is up to date with 'origin/AkinaSS-myownthing'.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git switch main
Switched to branch 'main'
Your branch is ahead of 'origin/main' by 1 commit.
  (use "git push" to publish your local commits)
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git switch AkinaSS-myownthing 
Switched to branch 'AkinaSS-myownthing'
Your branch is up to date with 'origin/AkinaSS-myownthing'.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push
Everything up-to-date
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git switch main
Switched to branch 'main'
Your branch is ahead of 'origin/main' by 1 commit.
  (use "git push" to publish your local commits)
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git status
On branch main
Your branch is ahead of 'origin/main' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git branch
  AkinaSS-myownthing
* main
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git switch AkinaSS-myownthing 
Switched to branch 'AkinaSS-myownthing'
Your branch is up to date with 'origin/AkinaSS-myownthing'.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git status
On branch AkinaSS-myownthing
Your branch is up to date with 'origin/AkinaSS-myownthing'.

nothing to commit, working tree clean
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git switch main
Switched to branch 'main'
Your branch is ahead of 'origin/main' by 1 commit.
  (use "git push" to publish your local commits)
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git checkout -b branch
Switched to a new branch 'branch'
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git status
On branch branch
nothing to commit, working tree clean
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=<remote>/<branch> branch

chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git pull origin main
From https://github.com/TheEvergreenStateCollege/upper-division-cs
 * branch              main       -> FETCH_HEAD
Already up to date.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git status
On branch branch
nothing to commit, working tree clean
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git status
On branch branch
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        Readme.md

nothing added to commit but untracked files present (use "git add" to track)
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git add .
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git commit -m "Adding readme"
[branch b24e81ee] Adding readme
 1 file changed, 1 insertion(+)
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/Readme.md
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push
fatal: The current branch branch has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin branch

chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push --set-upstream origin branch
To https://github.com/TheEvergreenStateCollege/upper-division-cs.git
 ! [rejected]          branch -> branch (non-fast-forward)
error: failed to push some refs to 'https://github.com/TheEvergreenStateCollege/upper-division-cs.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git pull ...
fatal: '...' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git pull origin main
From https://github.com/TheEvergreenStateCollege/upper-division-cs
 * branch              main       -> FETCH_HEAD
Already up to date.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push --help
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git fetch origin
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 9 (delta 6), reused 7 (delta 4), pack-reused 0
Unpacking objects: 100% (9/9), 915 bytes | 305.00 KiB/s, done.
From https://github.com/TheEvergreenStateCollege/upper-division-cs
   d0b5ffd8..322b3deb  LANCHESS   -> origin/LANCHESS
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git rebase origin/branch
Auto-merging web-24wi/scripts/web-include.sh
CONFLICT (content): Merge conflict in web-24wi/scripts/web-include.sh
error: could not apply 186cdb9d... updating pnpm path
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 186cdb9d... updating pnpm path
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ ^C
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ ^C
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git rebase abort
fatal: It seems that there is already a rebase-merge directory, and
I wonder if you are in the middle of another rebase.  If that is the
case, please try
        git rebase (--continue | --abort | --skip)
If that is not the case, please
        rm -fr ".git/rebase-merge"
and run me again.  I am stopping in case you still have something
valuable there.

chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git rebase --abort
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git branch
  AkinaSS-myownthing
* branch
  main
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=<remote>/<branch> branch

chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git pull origin main
From https://github.com/TheEvergreenStateCollege/upper-division-cs
 * branch              main       -> FETCH_HEAD
Already up to date.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git switch main
Switched to branch 'main'
Your branch is ahead of 'origin/main' by 1 commit.
  (use "git push" to publish your local commits)
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git switch AkinaSS-myownthing 
Switched to branch 'AkinaSS-myownthing'
Your branch is up to date with 'origin/AkinaSS-myownthing'.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git switch branch
Switched to branch 'branch'
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git branch -vv
  AkinaSS-myownthing 990a01c7 [origin/AkinaSS-myownthing] Update my intro to web HW from week 3 to week 6
* branch             b24e81ee Adding readme
  main               81572953 [origin/main: ahead 1] Adding Final and remaining Intro to Web file
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git pull main
fatal: 'main' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git pull origin main
From https://github.com/TheEvergreenStateCollege/upper-division-cs
 * branch              main       -> FETCH_HEAD
Already up to date.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push
fatal: The current branch branch has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin branch

chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push --set-upstream origin branch
To https://github.com/TheEvergreenStateCollege/upper-division-cs.git
 ! [rejected]          branch -> branch (non-fast-forward)
error: failed to push some refs to 'https://github.com/TheEvergreenStateCollege/upper-division-cs.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git merge origin/branch
Merge made by the 'ort' strategy.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push
fatal: The current branch branch has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin branch

chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git push --set-upstream origin branch
Enumerating objects: 130, done.
Counting objects: 100% (118/118), done.
Delta compression using up to 8 threads
Compressing objects: 100% (95/95), done.
Writing objects: 100% (98/98), 2.16 MiB | 925.00 KiB/s, done.
Total 98 (delta 17), reused 6 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (17/17), completed with 7 local objects.
To https://github.com/TheEvergreenStateCollege/upper-division-cs.git
   986d73cc..07a59457  branch -> branch
Branch 'branch' set up to track remote branch 'branch' from 'origin'.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git branch
  AkinaSS-myownthing
* branch
  main
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git switch main
Switched to branch 'main'
Your branch is ahead of 'origin/main' by 1 commit.
  (use "git push" to publish your local commits)
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git reset HEAD
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git log
commit 815729534d57eafe3097c12aea5fca6b81134014 (HEAD -> main)
Author: AkinaSS <[email protected]>
Date:   Mon Mar 18 21:09:58 2024 -0700

    Adding Final and remaining Intro to Web file

commit 124e2879c7f65c406ec3abd51ba73a6d46e5124e (origin/main, origin/HEAD)
Merge: eb2c87e1 63b7ab5b
Author: dee dee <[email protected]>
Date:   Sat Mar 16 10:23:36 2024 -0700

    Merge pull request #1290 from TheEvergreenStateCollege/ddnscRemoveDir
    
    remove ide dir
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git reset --hard 815729534d57eafe3097c12aea5fca6b81134014
HEAD is now at 81572953 Adding Final and remaining Intro to Web file
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git reset --hard 124e2879c7f65c406ec3abd51ba73a6d46e5124e
HEAD is now at 124e2879 Merge pull request #1290 from TheEvergreenStateCollege/ddnscRemoveDir
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git pull
remote: Enumerating objects: 28, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 28 (delta 4), reused 4 (delta 4), pack-reused 12
Unpacking objects: 100% (28/28), 20.59 KiB | 3.43 MiB/s, done.
From https://github.com/TheEvergreenStateCollege/upper-division-cs
   124e2879..c865af8d  main       -> origin/main
Updating 124e2879..c865af8d
Fast-forward
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/JavaScript/formValidation.js      |   62 +
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/JavaScript/jquery-3.7.1.min.js    |    2 +
 .../assignments/AkinaSS/Intro to web/myhwassignment/JavaScript/jquery-migrate-3.4.1.js     | 1018 ++++++++++++
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/JavaScript/merchandiseStyle.js    |  106 ++
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/JavaScript/timeClock.js           |   48 +
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/extras.html                       |  277 ++++
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/AUS.jpg                    |  Bin 140283 -> 555666 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/GS.jpg                     |  Bin 50085 -> 117262 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/UK.jpg                     |  Bin 68483 -> 140658 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/VN.jpg                     |  Bin 187418 -> 412013 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/alexpall.jpg               |  Bin 81818 -> 58024 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/bandmember.jpg             |  Bin 9571 -> 0 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/chicago.jpg                |  Bin 30675 -> 0 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/closer.jpg                 |  Bin 0 -> 66788 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/drewtaggart.jpg            |  Bin 101342 -> 58773 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/la.jpg                     |  Bin 17761 -> 0 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/mattmcguire.jpg            |  Bin 0 -> 25570 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/medicine.jpg               |  Bin 0 -> 48590 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product1.jpg   |  Bin 0 -> 8322 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product2.jpg   |  Bin 0 -> 4696 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product3.jpg   |  Bin 0 -> 5210 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product4.jpg   |  Bin 0 -> 10476 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product5.jpg   |  Bin 0 -> 11393 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product6.jpg   |  Bin 0 -> 28356 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product7.jpg   |  Bin 0 -> 5631 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product8.jpg   |  Bin 0 -> 8458 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product9.jpg   |  Bin 0 -> 11344 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/ny.jpg                     |  Bin 21125 -> 0 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/rhettbixler.jpg            |  Bin 58057 -> 43036 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/safeandsound.jpg           |  Bin 0 -> 20752 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/selfie.jpg                 |  Bin 0 -> 56432 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/sickboy.jpg                |  Bin 0 -> 49395 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/sofarsogood.jpg            |  Bin 0 -> 126083 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/summertimefriends.jpg      |  Bin 0 -> 90114 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/wordsonbathroomwall.jpg    |  Bin 0 -> 61965 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/worldwarjoy.jpg            |  Bin 0 -> 99312 bytes
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/index.html                        |  257 +--
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/media.html                        |  316 ++++
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/merchandise.html                  |  130 ++
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/slideshow/README.md               |    5 +
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/slideshow/index.html              |  280 ++++
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/slideshow/slideshow.js            |  207 +++
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/slideshow/style.css               |  155 ++
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/styles.css                        |  202 ++-
 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/thankyou.html                     |  123 ++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/.gitignore                           |    3 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/Readme.md                            |    1 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/package-lock.json                    | 3713 ++++++++++++++++++++++++++++++++++++++++++++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/package.json                         |   44 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/JavaScript/formValidation.js   |   62 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/JavaScript/jquery-3.7.1.min.js |    2 +
 .../assignments/AkinaSS/Intro to web/web-hosting/pages/JavaScript/jquery-migrate-3.4.1.js  | 1018 ++++++++++++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/JavaScript/merchandiseStyle.js |  106 ++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/JavaScript/timeClock.js        |   48 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/extras.html                    |  277 ++++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/AUS.jpg                 |  Bin 0 -> 555666 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/BK.jpg                  |  Bin 0 -> 104934 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/GS.jpg                  |  Bin 0 -> 117262 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/LV.jpg                  |  Bin 0 -> 93559 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/UK.jpg                  |  Bin 0 -> 140658 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/USA.jpg                 |  Bin 0 -> 233847 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/VN.jpg                  |  Bin 0 -> 412013 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/alexpall.jpg            |  Bin 0 -> 58024 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/closer.jpg              |  Bin 0 -> 66788 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/drewtaggart.jpg         |  Bin 0 -> 58773 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/map.jpg                 |  Bin 0 -> 170615 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/mattmcguire.jpg         |  Bin 0 -> 25570 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/medicine.jpg            |  Bin 0 -> 48590 bytes
 .../assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product1.jpg     |  Bin 0 -> 8322 bytes
 .../assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product2.jpg     |  Bin 0 -> 4696 bytes
 .../assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product3.jpg     |  Bin 0 -> 5210 bytes
 .../assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product4.jpg     |  Bin 0 -> 10476 bytes
 .../assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product5.jpg     |  Bin 0 -> 11393 bytes
 .../assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product6.jpg     |  Bin 0 -> 28356 bytes
 .../assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product7.jpg     |  Bin 0 -> 5631 bytes
 .../assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product8.jpg     |  Bin 0 -> 8458 bytes
 .../assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product9.jpg     |  Bin 0 -> 11344 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/newyork.jpg             |  Bin 0 -> 33636 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/paris.jpg               |  Bin 0 -> 29529 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/rhettbixler.jpg         |  Bin 0 -> 43036 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/safeandsound.jpg        |  Bin 0 -> 20752 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/sanfran.jpg             |  Bin 0 -> 16102 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/selfie.jpg              |  Bin 0 -> 56432 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/sickboy.jpg             |  Bin 0 -> 49395 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/sofarsogood.jpg         |  Bin 0 -> 126083 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/summertimefriends.jpg   |  Bin 0 -> 90114 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/wordsonbathroomwall.jpg |  Bin 0 -> 61965 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/worldwarjoy.jpg         |  Bin 0 -> 99312 bytes
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/index.html                     |  319 ++++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/media.html                     |  316 ++++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/merchandise.html               |  130 ++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/slideshow/README.md            |    5 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/slideshow/index.html           |  280 ++++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/slideshow/slideshow.js         |  207 +++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/slideshow/style.css            |  155 ++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/styles.css                     |  414 +++++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/thankyou.html                  |  123 ++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pnpm-lock.yaml                       | 2359 ++++++++++++++++++++++++++++
 .../AkinaSS/Intro to web/web-hosting/prisma/migrations/20240312051017_init/migration.sql   |   51 +
 .../AkinaSS/Intro to web/web-hosting/prisma/migrations/20240314080118_init/migration.sql   |    8 +
 .../assignments/AkinaSS/Intro to web/web-hosting/prisma/migrations/migration_lock.toml     |    3 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/prisma/schema.prisma                 |   55 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/api-server-start.sh          |   20 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/docker-compose.yaml          |   14 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/easy-tunnel/easy-tunnel.sh   |   31 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/easy-tunnel/readme.md        |   30 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/setup.sh                     |   38 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/web-dev.sh                   |   68 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/web-include.sh               |   62 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/web-prod.sh                  |   85 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/handlers/cart.ts                 |   74 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/handlers/db.ts                   |    5 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/handlers/product.ts              |   94 ++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/handlers/user.ts                 |   87 ++
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/index.ts                         |    9 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/modules/auth.js                  |   49 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/modules/error.js                 |   15 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/modules/middleware.js            |   15 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/router.ts                        |   67 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/server.ts                        |   55 +
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/tsconfig.json                        |   10 +
 121 files changed, 13591 insertions(+), 124 deletions(-)
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/JavaScript/formValidation.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/JavaScript/jquery-3.7.1.min.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/JavaScript/jquery-migrate-3.4.1.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/JavaScript/merchandiseStyle.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/JavaScript/timeClock.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/extras.html
 delete mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/bandmember.jpg
 delete mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/chicago.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/closer.jpg
 delete mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/la.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/mattmcguire.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/medicine.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product1.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product2.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product3.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product4.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product5.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product6.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product7.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product8.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/merchandise/product9.jpg
 delete mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/ny.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/safeandsound.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/selfie.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/sickboy.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/sofarsogood.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/summertimefriends.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/wordsonbathroomwall.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/images/worldwarjoy.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/media.html
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/merchandise.html
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/slideshow/README.md
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/slideshow/index.html
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/slideshow/slideshow.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/slideshow/style.css
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/myhwassignment/thankyou.html
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/.gitignore
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/Readme.md
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/package-lock.json
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/package.json
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/JavaScript/formValidation.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/JavaScript/jquery-3.7.1.min.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/JavaScript/jquery-migrate-3.4.1.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/JavaScript/merchandiseStyle.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/JavaScript/timeClock.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/extras.html
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/AUS.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/BK.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/GS.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/LV.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/UK.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/USA.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/VN.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/alexpall.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/closer.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/drewtaggart.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/map.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/mattmcguire.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/medicine.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product1.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product2.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product3.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product4.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product5.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product6.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product7.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product8.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/merchandise/product9.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/newyork.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/paris.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/rhettbixler.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/safeandsound.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/sanfran.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/selfie.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/sickboy.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/sofarsogood.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/summertimefriends.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/wordsonbathroomwall.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/images/worldwarjoy.jpg
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/index.html
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/media.html
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/merchandise.html
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/slideshow/README.md
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/slideshow/index.html
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/slideshow/slideshow.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/slideshow/style.css
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/styles.css
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pages/thankyou.html
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/pnpm-lock.yaml
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/prisma/migrations/20240312051017_init/migration.sql
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/prisma/migrations/20240314080118_init/migration.sql
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/prisma/migrations/migration_lock.toml
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/prisma/schema.prisma
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/api-server-start.sh
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/docker-compose.yaml
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/easy-tunnel/easy-tunnel.sh
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/easy-tunnel/readme.md
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/setup.sh
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/web-dev.sh
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/web-include.sh
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/scripts/web-prod.sh
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/handlers/cart.ts
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/handlers/db.ts
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/handlers/product.ts
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/handlers/user.ts
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/index.ts
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/modules/auth.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/modules/error.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/modules/middleware.js
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/router.ts
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/server.ts
 create mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/tsconfig.json
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git branch
  AkinaSS-myownthing
  branch
* main
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git branch -d AkinaSS-myownthing 
Deleted branch AkinaSS-myownthing (was 990a01c7).
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ pnpm run dev

> [email protected] dev /home/chikathetougemaster/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting
> npm run build && nodemon ./dist/src/index.js


> [email protected] build
> tsc

[nodemon] 3.1.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node ./dist/src/index.js`
postgresql://postgres:lol@localhost:5432/pg
postgresql://postgres:lol@localhost:5432/pg
Hello from express, check out http://AkinaSS.arcology.builders:5000/ for result
^Cchikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git checkout -b minor
Switched to a new branch 'minor'
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git branch
  branch
  main
* minor
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git branch -d branch
Deleted branch branch (was 07a59457).
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git switch main
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git branch -d minor
warning: deleting branch 'minor' that has been merged to
         'refs/remotes/upstream/minor', but not yet merged to HEAD.
Deleted branch minor (was 4cda8f9d).
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git pull
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 22 (delta 13), reused 9 (delta 8), pack-reused 0
Unpacking objects: 100% (22/22), 5.65 KiB | 578.00 KiB/s, done.
From https://github.com/TheEvergreenStateCollege/upper-division-cs
   c865af8d..88e6c7e2  main       -> origin/main
Updating c865af8d..88e6c7e2
Fast-forward
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/Readme.md     | 1 -
 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/src/server.ts | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
 delete mode 100644 web-24wi/assignments/AkinaSS/Intro to web/web-hosting/Readme.md
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
chikathetougemaster@LAPTOP-8U2KT215:~/upper-division-cs-2024/web-24wi/assignments/AkinaSS/Intro to web/web-hosting$

In general, I think to solve this, you need to resolve or restore the file and not commit them yet unless you know that it's going to work well. When you are stuck, you need to merge the commit with main by doing git push -u origin main or git merge. I don't know but a preventative measure is to create a new branch every time you start working on something new in the repo

Mon, Mar 25, 2024

Today, I'm adding a unit test for the project, just for fun and completionist stuff. I add them with the help of a copilot since I don't get the general theme about them yet, even with the help of chatgpt. The only thing I got so far is it's like a condition test, but more extensive

import express from 'express';
import supertest from 'supertest';
import app from './server';

describe('Server Tests', () => {
  it('should respond with status 200 for the root endpoint', async () => {
    const response = await supertest(app).get('/');
    expect(response.status).toBe(200);
  });

  it('should respond with status 200 for the login endpoint', async () => {
    const response = await supertest(app).post('/login');
    expect(response.status).toBe(200);
  });

  it('should respond with status 200 for the cart endpoint', async () => {
    const response = await supertest(app).post('/cart');
    expect(response.status).toBe(200);
  });

  // Add more test cases as needed
}); //server.ts
import express from 'express';
import supertest from 'supertest';
import router from './router';

const app = express();
app.use(router);

describe('Router Tests', () => {
  it('should respond with status 200 for the root endpoint', async () => {
    const response = await supertest(app).get('/');
    expect(response.status).toBe(200);
  });

  it('should respond with status 200 for the login endpoint', async () => {
    const response = await supertest(app).post('/login');
    expect(response.status).toBe(200);
  });

  it('should respond with status 200 for the cart endpoint', async () => {
    const response = await supertest(app).post('/cart');
    expect(response.status).toBe(200);
  });

  // Add more test cases for other routes as needed
}); //router.ts

Tue, Mar 26, 2024

Today I started adding the wishlist feature to the project, unfortunately, I'm having trouble on how to make it work because of the schema logic, my product depends on my wishlist to create but in reality, it should be the reverse, and my wishlist should depend on my product

I finally found a fix, by making a many-to-many relation for both product and wishlist, that a product can appear in many wishlists and a wishlist can have many products. For some reason, the last time I implemented these I got a lot of unresolved errors related to User, maybe I made a mistake in a wishlist to have many users?

I added some more stuff inside and made the system temporarily work in the backend if I submit things straight to Prisma Studio, now it's time for the buggy log-in. I want to implement a system where after a user logs in, it'll take the user straight back to the main page without having to go back. But for the current time, it seems like they just successfully log in and stay there

It seems I found the correct way to do them by making use of window.location.href but for some reason, it doesn't work very well, it keeps getting to the page repeatedly

It turns out that the default href for the page locked the button to go to that page every time, I just need to remove the href and attach an ID to the button so the function can repeatedly work, however, it makes the button ugly without the pointer press in like all the other pages did

I decide to go to the main CSS file, style.css to fix it, however, I encounter a different error

) expectedcss(css-rparentexpected

This error occurs in this specific code

@supports (scroll-snap-type) {
    .slider > a {
      display: none;
    }
}

While there's no parenthesis missing as expected, I spent a lot of time checking this and I'm positive that this is the correct syntax.

There are no answers or fixes related to how it's causing this as I search everywhere including using chatgpt, which always gives false positive information on this, I guess that it conflicts with either of my vs code extensions or default vs code listing since Annie doesn't mention any of this error initially when we talked, however, it works without issue so I'll leave it as it is

This is the final product of the code:

document.addEventListener('DOMContentLoaded', function() {
        const signInButton = document.querySelector('#signInButton');
    
        signInButton.addEventListener('click', function() {
            // Check if the user is already logged in, if true, alert the user and ask if they want to log out
            const isLoggedIn = localStorage.getItem('isLoggedIn');
            
            // Convert the value to a boolean
            const isLoggedInBool = isLoggedIn === 'true';

            // Check if the user is logged in
            if (isLoggedInBool) {
                // Pass the condition directly to confirm() function
                if (confirm('You are already logged in!, do you want to log out?')) {
                    // Remove the token and shopping cart from localStorage
                    localStorage.removeItem('token');
                    localStorage.clear();
                    localStorage.setItem('isLoggedIn', 'false');
                    window.location.href = 'logIn.html';
                }
                else {
                    window.location.href = 'index.html';
                }
            } else {
                // Redirect to logIn.html
                if (confirm('You are not logged in. Redirecting to logIn.html')) {
                    window.location.href = 'logIn.html';
                } else {
                    window.location.href = 'index.html';
                }
            }
        });
});

Now to start adding the wishlist functionality to the code and make it workable

The idea I have is to use an ID system base to get the ID of the product through the script, attach each button to each id then extract them through the script. This method only works if you have a limited number of items on the shelf and it won't work at a database level since you have to manually add the ID of the product bound to each button every time you have something new and it's not very efficient. However, it's just a school project, plus there are 12 different items only so I chose this

Wed, Mar 27, 2024

I successfully post a request to create a wishlist like the following stack trace, however, it doesn't fully register to the database for some reason

Hello from express, check out http://AkinaSS.arcology.builders:5000/ for result
{"username":"[email protected]","password":"123"}
{"username":"[email protected]","password":"123"}
POST /signin 200 214.673 ms - 212
POST /cart 200 1.105 ms - 2357
POST /cart 200 0.963 ms - 2357
{"username":"[email protected]","password":"123"}
{"username":"[email protected]","password":"123"}
POST /signin 200 242.077 ms - 212
POST /cart 200 0.813 ms - 2357

It turns out I remember that from the frontend master API class, everything other than the user route has been protected through the API sub-route, and I should post there instead of doing it like what I did with a User

now I have an unauthorized error, it needs a bearer token and I forgot to install it

Update at 1:57 am that day: I successfully posted them to the thunder client but for some reason, it doesn't work on the functions themselves in the script, it gives me an unauthorize and the content type is different since it sends a text/HTML instead of application/JSON

Thu, Mar 28, 2024

I decided to call Paul for help looking at the code since I was too buried in it and couldn't find an answer for myself. It turns out that my bearer token has an extra double quote("") on the token, which should not be there because I using JSON stringify which strings my token, I also found out it was because of my error handling that made it send a text/html content instead, which is not related to the error but also have some connection because I wired a failed case to it. All of these were for the help of Paul pointing out

Paul also gave me some advice on what should be the correct relationship between database models in my schema, but when I tested it, it gave me more errors than I expected. When I re-checking the router and handler, it seemed to be hardcoded and took a long time to change, so I decided to shorter the work and post what it is

Paul also proposed a wishlist model that could also be included, with the correct relations on what it should be if a user can have multiple wishlists, unfortunately, it gave me more errors than expected and I was completely burned on this project, including other work I haven't finished, so I add it in comments and keep the old one for a working version, I also intend to add some more functionality like a user can have multiple wishlists, being able to add multiple products (now that I have already added a many to many relations to my product and wishlist model and the prototype for this idea is fully working if you use Prisma studio to manually added the product in) but I think it's the best time to call it a day, write some entries and close the project for the sake of getting my credits, I also didn't finish much from Richard as well so I need to caught up on that

Anyway, here's the working version that can add products to your account and create a wishlist at the same time if you don't have them:

// Get the cart icon and the cart number element
const cartIcon = document.querySelector('.cart button');
const cartNum = document.getElementById('cartNum');

// Initialize cart count and cart items array
let cartCount = 0;
const cartItems = [];

const isLoggedIn = localStorage.getItem('isLoggedIn');
            
// Convert the value to a boolean
const isLoggedInBool = isLoggedIn === 'true';

// Add event listener to all "Add to Cart" buttons
const addToCartButtons = document.querySelectorAll('.products button');
addToCartButtons.forEach((button, index) => {
    button.addEventListener('click', async (event) => {
        // Check if the user is already logged in, if false, alert the user and ask if they want to log in
        if (!isLoggedInBool) {
            // Pass the condition directly to confirm() function
            if (confirm('You are not logged in. Redirecting to logIn.html')) {
                window.location.href = 'logIn.html';
            }
            else {
                window.location.href = 'index.html';
            }
        } else {

            // Retrieve the bearer token from local storage
            const token = localStorage.getItem('token');

            // Continue with the wishlist functionality
            // Increment cart count
            cartCount++;

            // Update cart number
            cartNum.textContent = cartCount;

            // Add product to cart
            const product = {
                name: button.parentElement.querySelector('h3').textContent,
                description: button.parentElement.querySelector('p').textContent,
                image: button.parentElement.querySelector('img').getAttribute('src')
            };
            cartItems.push(product);

            // Get the parent element (div) of the button
            var uuidDiv = event.target.closest('[data-uuid]');

            // Check if the parent element exists
            if (uuidDiv) {
                // Get the UUID from the data-uuid attribute of the parent element
                var uuid = uuidDiv.getAttribute('data-uuid');

                // Add product to cart database version
                const response = await fetch('/api/cart', {
                    method: 'post',
                    headers: {
                        'Accept': 'application/json',
                        "Content-Type": "application/json",
                        "Authorization": `Bearer ${token}`
                    },
                    body: JSON.stringify({"name": button.parentElement.querySelector('h3').textContent, "body": button.parentElement.querySelector('p').textContent, "productId": uuid}),
                });
                if (response.status === 401) {
                    const { message } = await response.json();
                    alert(message);
                    return;
                }
            } else {
                // Handle the case when the parent element is not found
                console.error('Parent element not found');
            }

            // Save cart items to localStorage (optional)
            localStorage.setItem('cartItems', JSON.stringify(cartItems));
            
        }
    });
});

// Add event listener to cart icon to navigate to cart.html
cartIcon.addEventListener('click', () => {
    if (cartItems.length != 0) {
        // Update cart number
        cartCount = cartItems.length;
        cartNum.textContent = cartCount;
    }
    // Redirect to cart.html
    window.location.href = 'cart.html';
});

Fri, Mar 29, 2024

I started to construct the coffee shop, the calculator, and the word master, with that, I conclude this quarter's web engineering

I don't have any trouble creating coffeeshop based on my HTML/CSS knowledge but I have some trouble making a working calculator interface along with a working word master game

I ended up borrowing Annie's design and trying to rebuild it with my own JS using what she had for a challenge, for the calculator, I decided to make a makeshift Apple calculator with its color theme, for the word master, I just left it as it is, I ended successfully make the calculator working in some ways, but there're some small cases and flaws I need to fix

On the way, when I tested her calculator code and compared it with mine, I noticed that she has some this bug, most recognizable in this code:

if (buffer === "0") {
        return;
    }

This code makes some edge cases that don't work well when using an operator with 0 as a leading number because it just quit the function right away after it was activated, so I decided to substitute it with this code:

if (buffer === "0") {
        runningTotal = parseInt(buffer);
    }

This will include the 0 and calculate it correctly

I also worked on streamlining the calculator in the same time by tweaking the number handling function, this is what I got so far:

function handleNumber(number) {
    if (buffer === "0") {
        buffer = number;
    } else if (buffer && buffer.trim().length > 0) {
        buffer = "0";
        buffer += number;
    } else {
        buffer += number;
    }
}

This makes the code work on the small numbers but not bigger numbers since they are still stuck with the leading 0 she set as a buffer. I decided to add a small fix that makes the number still brute-force itself through the counter. However, it still wasn't working. But in general, it works in some ways, so I just leave it as a record for now

I got burnt out so I decided to borrow Annie's code and check everyone's version for the word master and observe how they did it, then implement the same way, I can't say much because I can't think well on this

With that, I ended the diary of the web design portion of SOS here. thank you, Paul, Paul Swish, and Quinn as they all provided help on the making of the backend design system and portion of this project and helps streamlining it at the same time, like a penultimate mark that helps the project to what it is. Thank you Annie for providing a wonderful front-end design that makes everyone in awe. Good luck on the path you chose and hope that our paths and choices will let us converge again someday in the future, Quinn.

The Journey continues here

⚠️ **GitHub.com Fallback** ⚠️