GithubHelp home page GithubHelp logo

node-idf's Introduction

Node Course

This repository contains the code examples given in Node course for IDF on April 19th, 2020

About me

My name is Yariv Katz and I will be the lecturer of this course. Check out my LinkedIn to learn more. Yariv Katz LinkedIn

Course Plan

About the course

  • What is Node
  • What can we create with Node
  • Node is not a framework so we need to learn Express as well
  • Why Node?

Node Introduction

  • Installing Node
  • Hello World
  • Understanding Javascript
  • Countdown example
  • Javascript Event driven
  • Javascript async code
  • Node structure
  • Javascript JIT compiled
  • REPL

Student EX. 30minutes

  • Iterate on all the environment variables and print all of them.
  • Make sure you manage to run you app using Visual Studio Code debugger
  • Make sure you run your code while adding environment variable of your own.

Modules

  • Splitting to multiple files
  • what is a module
  • our first module
  • core modules
  • community modules
  • npm
  • module wrapping function

Student EX. 30 minutes

  • create two modules
  • from one export a variable, a class, and a function
  • from the other use everything you exported

Async conventions

  • what is async code
  • classify your async code
  • error first callback
  • Promise
  • Event Emitter

Student EX. 30 minutes

  • create a file called fetch.js
  • this file will expose a function which will get a string url as an argument
  • The function will return a promise containing string.
  • The function will use the https module to send a get request to the url: https://nztodo.herokuapp.com/api/task/?format=json
  • you need to convert the result of https.request to a promise and the promise should contain the request data.

Exceptions

  • Error class
  • throwing an exception
  • try and catch
  • What happens to the process on exception
  • forever
  • Promise catch
  • Event Emitter - error event

Express introduction

  • Server
  • Application
  • Middleware
  • Router
  • Views
  • Exceptions

EX - REST Server 1hour

  • Create your first REST server
  • Create a module holding a singleton class called UserService
  • UserService should manage an array of users where each user has a firstName and a lastName
  • Our users array should be exposed via REST api to CRUD actions.

Testing with Mocha

  • Mocha
  • Chai
  • describe
  • it
  • hooks

Student EX - Mocha

  • Test one of the API of the REST server you created in the previous EX.
  • Make sure you can run your tests with Visual Studio Code while placing breakpoints for debugging your test.

Express Advanced and patterns

  • middleware creator
  • static middleware
  • body
  • cookies
  • sessions
  • CSRF
  • Authentication
  • Passport
  • JWT

Student EX. JWT authentication - 1 hour

  • Your REST api should be JWT protected
  • You can only query your REST api if you have the following header:
{
    Authorization: Bearer jwt-token
}
  • The JWT token should be obtained from a login screen.

Working with Relational Database

  • What is relational database
  • What is ORM
  • Sequelize Introduction
  • DB Relations
  • Validations
  • Migrations
  • Seeds
  • Creating REST server
  • About GraphQL
  • Creating a GraphQL Server

Working with Mongo

  • What is mongo
  • What is mongoose
  • db, collection, document

https://chat.whatsapp.com/EqIl3DtpQG27SAET5NcmtB

node-idf's People

Contributors

ywarezk avatar

Watchers

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