tracyfuller / solo_db_weekend_5 Goto Github PK
View Code? Open in Web Editor NEWWeekend 5 homework. Solo database with passport.
Weekend 5 homework. Solo database with passport.
# prime_solo_db_01 WEEKEND ASSIGNMENT GO It's time to get started using passport! The purpose of this assignment is to show that you can follow development guides created by people on the interwebs. Follow along, make sure you're putting code in the correct files, and try to read through the code and understand what's happening under the hood. ##A client's request You've been tasked with developing an application for a client that is required to authenticate users against a Mongo database. You are familiar with Node.JS, Express and MongoDB so you're sure you can get it to work with some help. Luckily, you found a really awesome step-by-step guide that has just the bare minimum requirements! ##Go do the thing! Create a new Node.JS solution in Web Storm (don't forget to create a .gitignore file and add .idea, node_modules and .DS_Store to it). Next, starting from zero, follow the guide that you found [here](https://docs.google.com/a/primeacademy.io/document/d/1SRq1ubPt0AUn8VybhZZ6fBqOoKaKlPIwScycJzFeAFQ/edit?usp=sharing). Once you've got everything installed and all of the code added, run the application. You should be able to register a test user and make sure the login screen works right. If it works, you'll see "true" displayed after logging in. ###Client changes The client neglected to mention that users should also be able to save a first name, last name, and email address when signing up in the registration form. Make those changes. Verify that those fields are saving with Robomongo. ##Hard Mode ###Finish the users screen You need to update the users.js route to send the users.html file. Then you need to lock down the users.html file. Do this by adding a `req.isAuthenticated()` check to the express route. Flesh out the users.html file. It should display a list of all users in the database (excluding passwords). You'll need to create an Ajax method to get the list of users, as well as a route to send the list of users that are in the database. The route that sends all users should also be protected by passport authenticate. **DO NOT SEND THE PASSWORDS IN THE RESPONSE** even though they're encrypted. **NOTE** AJAX calls send Cookies if the url you're calling is on the same domain as your calling script. If you're authenticated, you shouldn't have a problem. ##Pro Mode Integrate Grunt and Bootstrap into the project, and do some fancy styling!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.