diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..57195033 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.DS_Store +node_modules/ +package-lock.json diff --git a/README.md b/README.md index afcca619..eedb56bb 100755 --- a/README.md +++ b/README.md @@ -1,74 +1,22 @@ -Assignment 3 - Persistence: Two-tier Web Application with Flat File Database, Express server, and CSS template -=== +## Food You Eat -Due: September 16th, by 11:59 AM. +https://a3-jamesscherick.glitch.me -This assignnment continues where we left off, extending it to use the most popular Node.js server framework (express), a flat file database suitable for small applications (lowdb), and a CSS application framework / template of your choice (Boostrap, Material Design, Semantic UI, Pure etc.) +![What the website looks like after logging in](https://github.com/jimmyjam100/a3-persistence/blob/master/image.PNG) +The goal of this application is to have a place where everyone can have a personal list of all of the different types of food they eat so they can keep track of their diet. +To log in enter any unused username to create a new account, or use an existing username and password. +It took me many many hours to figure out how the authentification process worked. I would redirect to the home page and then be redirected right back because the login session did not save. Turned out I needed to add more middleware that I did not know about. +The authentification stratagy I used was just local, and for database I ended up just writing and reading from a json file for my database. That is bassically what lowDB does and I am more comfturable doing it like this. +I chose to use the pure css framework. I feel like its style really fit my theme of just a place you can list things without being to fancy or anything. It just felt clean. I also like how they do tables +I used passport, morgan, session, body-parser, and express-uncapitalize. +passport is used for authenticating users and creating a login system. +morgan is used for logging any get and post request that are made to the server. Used for debugging +session stores your login information for the duration of the session. +body-parser is used for parsing through http requests +express-uncapitalize uncapitalizes any url you have by redirecting you to the url that is not capitalized -Baseline Requirements ---- - -Your application is required to implement the following functionalities: - -- a `Server`, created using Express (no alternatives will be accepted for this assignment) -- a `Results` functionality which shows the entire dataset residing in the server's memory -- a `Form/Entry` functionality which allows users to add, modify, and delete data items (must be all three!) associated with their user name / account. -- Use of at least five [Express middleware packages](https://expressjs.com/en/resources/middleware.html). Explore! -- Basic authentication using the [Passport middleware](http://www.passportjs.org) for Express (this counts as one of your five middleware packages). We encourage using the Local strategy, but OAuth (Open Authentication) can also be used for additional technical achievement. The course staff cannot help you with the various flavors of OAuth strategies. YOU MUST PROVIDE US WITH ACCOUNT CREDENTIALS TO LOGIN TO YOUR APPLICATION IF YOU USE OAUTH. The course staff cannot be expected to have credentials for any particular OAuth service. -- Persistent data storage in between server sessions. [lowdb](https://github.com/typicode/lowdb) is a suitable database package for this assignment and will be discussed in class. -- Use of a [CSS framework or template](https://github.com/troxler/awesome-css-frameworks). This should do the bulk of your styling/CSS for you and be appropriate to your application. For example, don't use [NES.css](https://nostalgic-css.github.io/NES.css/) (which is awesome!) unless you're creating a game or some type of retro 80s site. - -Your application is required to demonstrate the use of the following concepts: - -HTML: -- HTML input tags and form fields of various flavors (`