GithubHelp home page GithubHelp logo

code-along-uber-for-laundry's Introduction

Ironhack Logo

Express | Code Along - Uber For Laundry

Learning Goals

  • Add basic user authentication to an Express application.
  • Create sessions in an Express application.
  • Store user information in the session and use it in some routes.
  • Prevent anonymous (logged out) users from accessing parts of your application.

Setup

Clone the Uber For Laundry repo into your ~/code/labs folder to get the starter code.

$ cd ~/code/labs
$ git clone https://github.com/ironhack-labs/code-along-uber-for-laundry
$ cd code-along-uber-for-laundry/

Run npm install to get all the modules from the package.json file.

$ npm install

Introduction

Let's face it: everybody has to do laundry. Even Batman.

Laundry takes so much of our time. Don't even get me started on folding. It's often tempting to just not do it. Go out in dirty clothes. Who will know?

Until the day when we we all have robots to do our laundry for us, we have to do it ourselves.

Or do we?

What if we could make an app in which we could have other people do our laundry for us. No, that's not what your mother is for. I'm talking about strangers with a lot of time on their hands that want to make some extra money on the side. Regular people like you or me!

Let's create an app to solve the working professional's laundry problem using Express, Mongoose, bcrypt and sessions. Maybe we really will become Uber for Laundry!

The app will allow users to register and schedule a laundry pickup. They will be able to:

  1. Sign up as a user.
  2. Log in.
  3. Log out.
  4. Become a launderer (optional).
  5. Find a launderer.
  6. Schedule a laundry pickup with a launderer.
  7. See pending pickups.

Starter Code

The starter code for this project includes:

  1. An app structure created by the express-generator.
  2. Layout already added for you.
  3. Views for all the pages we are going to be working with.
  4. The User and LaundryPickup models.
starter-code/
├── .gitignore
├── app.js
├── bin
│   └── www
├── models
│   ├── laundry-pickup.js
│   └── user.js
├── package.json
├── public
│   └── stylesheets
│       └── style.css
├── routes
│   ├── index.js
│   └── users.js
└── views
    ├── auth
    │   ├── login.ejs
    │   └── signup.ejs
    ├── error.ejs
    ├── index.ejs
    ├── laundry
    │   ├── dashboard.ejs
    │   ├── launderer-profile.ejs
    │   └── launderers.ejs
    └── layouts
        └── main-layout.ejs

If you visit the homepage, you will see that there are a bunch of links that don't work. We will be adding the routes for each of those pages as part of this lesson.

Let's get to coding!

code-along-uber-for-laundry's People

Contributors

nizaroni avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.