NodeJS

1 / 10
volgende
Slide 1: Tekstslide
WebdevelopmentHBOStudiejaar 1

In deze les zitten 10 slides, met tekstslides.

time-iconLesduur is: 120 min

Onderdelen in deze les

Slide 1 - Tekstslide

NodeJS
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the

Slide 2 - Tekstslide

NodeJS
Fullstack development
  • front-end
  • back-end

Slide 3 - Tekstslide

NodeJS
Why use NodeJS

Slide 4 - Tekstslide

NODEJS - APP
Node console (node)
  • REPL
Run a file with Node (node <file-name>)
  • app.js

Slide 5 - Tekstslide

NODEJS - Excersice
  • Create an app.js file.
  • In app.js: Create a function 'echo' that takes two       variables(string and number).
  • The function  will do a console.log the number of times the number is.
  • Do a call to the function 2 times.
  • Run your app.js using node.
 

Slide 6 - Tekstslide

NODEJS - NPM
npm is the package manager for JavaScript and the world’s largest software registry. Discover packages of reusable code — and assemble them in powerful new ways.

Slide 7 - Tekstslide

NODEJS - NPM
Package installation for our project: (npm install <package-name>
- cat-me
var something = require('cat-me');

Slide 8 - Tekstslide

NODEJS - NPM
npm install <package-name> //node-modules

require('<package-name>') // use in our code

Read the documentation how to use!!

Slide 9 - Tekstslide

NODEJS - NPM - Exersice
install the 'faker' package -- not Faker but faker!
Create a directory myShop, in that directory create a file called: listProducts.js.
Read the documentation on faker and figure out how to use it.
Use faker to print out 10 products with price.
Run it with Node

Slide 10 - Tekstslide