navin-moorthy / WIP-code-with-node-Ian

Intermediate Node Developement Course

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code-With-Node-Ian

Intermediate Node Developement Course

Section 1

Intro and Overview

  • Going to build a Shoping site at the end of the course and it's in progress and will get updated regularly.
  • RTFM kind of advice in debugging the code.
  • Trello - Improves productivity a lot.

Section 2

Bootstrapping of Express and Database Design

Setting up Express with Express Generator

  • Express-Generator to quickly create application skeleton.

  • npm i express-generator -g - Installed Express Generator

  • Initial Template

    $ express --view=ejs surf-shop
    
    create : surf-shop/
    create : surf-shop/public/
    create : surf-shop/public/javascripts/
    create : surf-shop/public/images/
    create : surf-shop/public/stylesheets/
    create : surf-shop/public/stylesheets/style.css
    create : surf-shop/routes/
    create : surf-shop/routes/index.js
    create : surf-shop/routes/users.js
    create : surf-shop/views/
    create : surf-shop/views/error.pug
    create : surf-shop/views/index.pug
    create : surf-shop/views/layout.pug
    create : surf-shop/app.js
    create : surf-shop/package.json
    create : surf-shop/bin/
    create : surf-shop/bin/www
    
    change directory:
     $ cd surf-shop
    
    install dependencies:
     $ npm install
    
    run the app:
     $ DEBUG=surf-shop:* npm start
  • Initial auto generated package.json

    {
      "name": "surf-shop",
      "version": "0.0.0",
      "private": true,
      "scripts": {
        "start": "node ./bin/www"
      },
      "dependencies": {
        "cookie-parser": "~1.4.3",
        "debug": "~2.6.9",
        "ejs": "~2.5.7",
        "express": "~4.16.0",
        "http-errors": "~1.6.2",
        "morgan": "~1.9.0"
      }
    }
  • More dependencies - npm i -S mongoose body-parser passport npm i -D locus dotenv

  • Created mkdir models controllers middleware

  • Changed all the var to const that are meant to be constant in complaince with ES6.

  • Installing the Nodemon

  • Adding VCS git for tracking my files

  • UseLoom - To share hours and hours of coding videos

Section 3

Routes

  • Created Posts Routes with CRUD.
  • Created Reviews Routes for Posts with CRUD.
  • Created User and Index Routes with CRUD.

Section 4

Models

  • Created users models.
  • used passport-local-mongoose.
  • Created posts models.
  • Created reviews models.

Section 5

User Authentication

Section 6

Post Resources

  • Posts Index Page route setup done.
  • Posts New Page route setup done.
  • Posts Show Page route setup done.
  • Posts Edit Page route setup done. Used method-override for PUT requests.
  • Update the post and destroy. Used locus for debugging.

Section 7

Image Upload with Cloudinary

  • Signed up with Cloudinary.
  • Installed npm i -S cloudinary multer
  • Setup was made to upload 4 images and saved environment variables with dotenv
  • Image Edit and Delete in Post Form.

Section 8

GeoLocation with Mapbox

  • Signed up with MapBox.
  • npm install @mapbox/mapbox-sdk to install MapBox SDK into the Node.

About

Intermediate Node Developement Course


Languages

Language:JavaScript 67.2%Language:HTML 32.3%Language:CSS 0.5%