diff --git a/.env b/.env new file mode 100644 index 000000000..b80ec0c73 --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +PORT=5000 +GITHUB_CLIENT_SECRET=c301c36006269a5b6430199907d3e3c8aad06a6c +GITHUB_CLIENT_ID=bb9ec6bae003b51b42f3 +GITHUB_REDIRECT_URI=https://a3-dinmukhamed-umbetzhan.herokuapp.com/auth/success +MONGO_URI=mongodb+srv://admin:123@cluster0.4vcemjq.mongodb.net/?retryWrites=true&w=majority \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..c1d475416 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea +node_modules +/node_modules \ No newline at end of file diff --git a/README.md b/README.md index 1ba2c7a4c..fb3bd97bb 100644 --- a/README.md +++ b/README.md @@ -1,116 +1,37 @@ Assignment 3 - Persistence: Two-tier Web Application with Database, Express server, and CSS template -=== -Due: September 22nd, by 11:59 AM. +## Notify -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.) +https://a3-dinmukhamed-umbetzhan.herokuapp.com/auth/login -Baseline Requirements ---- +For this project I used heroku to achieve 5 points. -Your application is required to implement the following functionalities: +The goal of Notify is to add/delete and edit notes that was created by user. Any user can log in using github account, their nickname will be stored in the DB of the application. Each session is also stored in the DB of the application. After logging in user can use functionality mentioned above. -- a `Server`, created using Express (no alternatives will be accepted for this assignment) -- a `Results` functionality which shows all data associated with a logged in user (except passwords) -- 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! One of these five middleware -can be a custom function that you write yourself; if you choose to do this, make sure to describe what this function is in your README. -- Persistent data storage in between server sessions using [mongodb](https://www.mongodb.com/cloud/atlas) -- 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. +Biggest challenge while creating this application was storing the session of each user in the DB, since the documentation of the middleware is out of date and I had to find out the resolution on the web. -Your application is required to demonstrate the use of the following concepts: +For this project I have chosen authorization via github to achieve points and face the hardest challenge. And to be honest it was easy to implement since I have done it earlier. -HTML: -- HTML input tags and form fields of various flavors (`