Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 41 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,46 @@
Assignment 3 - Persistence: Two-tier Web Application with Database, Express server, and CSS template
# Assignment 3 - Persistence: Two-tier Web Application with Database, Express server, and CSS template
===

Due: September 23th, by 11:59 AM.
## An Arcade Game Scoreboard
Michael Lai https://a3-michael-lai.herokuapp.com

Note: 24hr extension granted from Professor.

With this assignment, I aimed to redeem myself after the disaster of project 2. (Although even this project has one minor mistake; but at least it mostly works this time, rather than not working at all)

The first step was to implement the remaining portions of project 2. That's been completed.

Next was to port the code to Express. Which involved learning how middleware worked in the framework. After that, these are the 5 middleware packages I've chosen:

- body-parser: Helps parse json within requests. Even though it depreciated and already part of express, the professor did allow the use of this middleware.
- server-favicon: Helps serve the favicon as to avoid processing any other middleware for a simple favicon request.
- checkDBConnection: A custom made middleware that does a simple check to see if the database is there.
- express-session: Used to help oauth work.
- passport (for oauth): Used to help oauth work.
- isAuth: A custom made middleware that checks for authentication and redirects you if it isn't available.

After that, I needed to implement the MongoDB system. This was a challenging process to get done, as I had a few asynchronous issues, but I resolved them in the end.

With that solved, I needed to create an authentication system. I decided to implement Github OAuth. The implmentation is technically complete, but users aren't able to edit their own data (but they can edit data nonetheless). The original plan was to show the full scoreboard, but only let users edit their own scores from the board (but this never worked out).

(Note: Not Implemented, ran out of time) Finally, the CSS guide. Because I was making an arcade highscore site, the retro CSS framework from the original readme was already the perfect choice.

## Technical Achievements
**1 - OAuth:**
I'm going to repeat the same stuff I mentioned above with the OAuth System. It works, as it displays the login page with a single button to sign in and you can log out in the scoreboard page (and without a valid session, you cannot access the scoreboard). The only issue is that it's not saving anything to the a specific user, as users aren't able to edit their own data, but they can edit data nonetheless. The original plan was to show the full scoreboard, but only let users edit their own scores from the board (but this never worked out).

The technical achievement did say to implement OAuth, which was done (but that's up to you on how to grade it).

**2 - Hosting on Heroku:**
For this project, instead of hosting the site on Glitch, I hosted it on Heroku. It's very similar in what actions they use to deploy your app, but I really like their improvements on the Github import, specifically the automatic import and the ability to select which branch you want to deploy from. This really came in handy when I finished with the original a2 project and had to switch gears to a3, as I decided to create a branch in case something bad happened.

## Design/Evaluation Achievements


## Old Readme Below
===

Due: September 28th, by 11:59 AM.

This assignnment continues where we left off, extending it to use the most popular Node.js server framework (express),
a database (mongodb), and a CSS application framework / template of your choice (Boostrap, Material Design, Semantic UI, Pure etc.)
Expand Down
12 changes: 12 additions & 0 deletions node_modules/.bin/ejs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/.bin/ejs.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions node_modules/.bin/ejs.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions node_modules/.bin/jake

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/.bin/jake.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions node_modules/.bin/jake.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/.bin/mime.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions node_modules/.bin/mime.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading