Getting Started with Express.js
A quick intro to express.js
Express.js
- Minimalistic framework
 
- Handles routing and views
 
- All other stuff is handled by modules
 
- npm install express -g
 
- express
 
- Scaffold express projects
 
Express skeleton *
- app.js
 
- bin/www
 
- public
 
- views
 
- routes
 
A Quick Tour *
- Route function
 
- Render a view
 
- Add dynamic data
 
- Add a form
 
- POST Route function
 
Jade
                        doctype html
html(lang="en")
  head
    title= pageTitle
    script(type='text/javascript').
      if (foo) {
         bar(1 + 5)
      }
  body
    h1 Jade - node template engine
    #container.col
      if youAreUsingJade
        p You are amazing
      else
        p Get on it!
      p.
        Jade is a terse and simple
        templating language with a
        strong focus on performance
        and powerful features.
                    Memetron
- It's hard to keep track of the best memes
 
- It's even harder to keep track where these were used
 
- -> Memetron!
 
Memetron *
- Scaffold
- 
mkdir memetron cd memetron express
 
 
- I'm using bootstrap
 
- Where to put assets (css, js, images, stuff)
 
- Layout
 
- Run the app npm install nodemon -g
 
Walkthrough *
- Application Setup
 
- Authentication
 
- CRUD Operations for Meme
 
Authentication *
- There is a module
 
- What a surprise
 
- npm install passport --save
 
- npm install passport-local --save
 
Thanks!
MongoDB and persistence next!