GithubHelp home page GithubHelp logo

multivision's Introduction

============= This course is out of date.

Express Changes

The latest version of express has deprecated the body parser middleware.

That means that when you see the following line of code:

app.use(bodyParser());

you should instead use the following two lines of code:

app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());

The latest version of express has also changed the session middleware a little bit and now requires that you explicitly specify a value for the resave parameter and the saveUninitialized parameter. So in the module on authentication when you see the following code:

app.use(session({secret: 'multi vision unicorns'}))

you should instead use the following code:

app.use(session({secret: 'multi vision unicorns',resave:false,saveUninitialized:false}));

Angular Changes

In addition to that, Angular 1.3 now requires a base tag when using html5Mode routing. In your layout.jade file (and maybe earlier in your index.jade), in the head you should place the following line of code:

base(href="/")

MongoDB Changes

Current versions of MongoDB require a "query" when calling the remove function. So periodically in the course we will delete all the users from the db with the following command:

db.users.remove()

But instead, you need to pass an empty "query object" into the remove function like this:

db.users.remove({})

Notes: To run the node server, type "node web-server.js" or "nodemon web-server.js" from the directory that contains the web-server.js file

Crypto Changes

In more recent versions of node.js update() and digest() are legacy methods. The new approach is to use the streaming API methods write() end() and read();

function hashPwd(salt, pwd){
  var hmac = crypto.createHmac('sha1', salt);
  hmac.setEncoding('hex');
  hmac.write(pwd);
  hmac.end();
  return hmac.read();
}

======= MEANAppsFiles

This course is out of date.

Express Changes

The latest version of express has deprecated the body parser middleware.

That means that when you see the following line of code:

app.use(bodyParser());

you should instead use the following two lines of code:

app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());

The latest version of express has also changed the session middleware a little bit and now requires that you explicitly specify a value for the resave parameter and the saveUninitialized parameter. So in the module on authentication when you see the following code:

app.use(session({secret: 'multi vision unicorns'}))

you should instead use the following code:

app.use(session({secret: 'multi vision unicorns',resave:false,saveUninitialized:false}));

Angular Changes

In addition to that, Angular 1.3 now requires a base tag when using html5Mode routing. In your layout.jade file (and maybe earlier in your index.jade), in the head you should place the following line of code:

base(href="/")

MongoDB Changes

Current versions of MongoDB require a "query" when calling the remove function. So periodically in the course we will delete all the users from the db with the following command:

db.users.remove()

But instead, you need to pass an empty "query object" into the remove function like this:

db.users.remove({})

Notes: To run the node server, type "node web-server.js" or "nodemon web-server.js" from the directory that contains the web-server.js file

Crypto Changes

In more recent versions of node.js update() and digest() are legacy methods. The new approach is to use the streaming API methods write() end() and read();

function hashPwd(salt, pwd){
  var hmac = crypto.createHmac('sha1', salt);
  hmac.setEncoding('hex');
  hmac.write(pwd);
  hmac.end();
  return hmac.read();
}

multivision's People

Contributors

benoitrion avatar

Watchers

 avatar  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.