forked from dandiflower/Footprint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated readme and ... problem with getSlideVal...?
- Loading branch information
1 parent
c4d0043
commit 43be8c8
Showing
4 changed files
with
49 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,50 @@ | ||
# Securing MERN Stack Web Application using Passport | ||
# Footprint | ||
|
||
This source code is part of [Securing MERN Stack Web Application using Passport](https://www.djamware.com/post/5a90c37980aca7059c14297a/securing-mern-stack-web-application-using-passport) tutorial. | ||
Footprint is a React application which easily calculates a user's eco-footprint based on the user's lifestyle. People can learn how to reduce their footprint by taking the quiz and seeing how they compare to the average. | ||
|
||
To run this source code: | ||
## Use the app: | ||
* [Launch app](https://infinite-badlands-27209.herokuapp.com) | ||
|
||
* Clone this repo | ||
* Run MongoDB server | ||
* Run `npm npm run-script build` | ||
* Run `npm start` | ||
![Homepage](client/src/components/Video/assets/homepage.jpg) | ||
|
||
## To run this source code: | ||
|
||
* Make sure MongoDB server is running | ||
* Run 'yarn run build' & then 'yarn start' | ||
|
||
## Built With: | ||
|
||
* React | ||
* Passport | ||
* Concurrently | ||
* Express | ||
* Mongoose | ||
* React Chart.js 2 | ||
* see package.json for additional packages | ||
|
||
## Code examples | ||
|
||
* **Passport** - User authentification: | ||
|
||
``` | ||
![Code](client/src/components/Video/assets/passport_auth.jpg) | ||
``` | ||
|
||
* **Session Storage** - Creating User Session (using jQuery click event): | ||
``` | ||
router.get('/logout', (req, res)=>{ | ||
res.localStorage.removeItem('jwtToken'); | ||
res.clearCookie("user", {path:"http://localhost:3000/"}); | ||
res.set('user', {expires: Date.now()}); | ||
res.json(true); | ||
}); | ||
``` | ||
|
||
## Authors 🖋 | ||
|
||
* **Hannah Lim** [Hannah Lim](https://github.com/hannahlim213) | ||
* **Jessica Brush** [Jessica Brush](https://github.com/dandiflower) | ||
|
||
## Acknowledgments 🗣 | ||
|
||
* **A big thank you to our instructors and TA's at Berkeley's Coding bootcamp!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.