Xpress front-end record (two) --------- nodejs based learning

Nodejs Profile

  1. What Nodejs that? what
  2. What Nodejs do? what
  3. Why use Nodejs it? why
  4. Why learn Nodejs it? why
  5. Where Nodejs use it? where
  6. Nodejs how to use it? how

What Nodejs that?

   Node.js is a Javascript-based operating environment Chrome V8 engine.

   Node.js uses an event-driven, non-blocking I / O (input / output) model.

   Javascript Node.js let become the PHP, Python, Perl, Ruby and other languages ​​on an equal footing server-side scripting language.

   Released in May 2009, developed by Ryan Dahi, in essence, Chrome V8 engine package.

    Note: Node.js is not a separate language.

 

   Official website: <https://nodejs.org/>

What Nodejs do?

   Nodejs adopted a framework known as the "event loop" so that the high write scalability of server becomes easy and safe.

   V8 engine itself uses some of the latest compiler technology. This makes this type of scripting language Javascript code to run out of speed has greatly improved, but also saves development costs.

   Node uses the way a series of "non-blocking" library to support the event loop, essentially as a file system, database resources like interface.

   Node let Javascript running on the server, solving the problem of freedom tour limits our choice of programming language.

 

    

      - Server-side development
     - Interface Server
     - real-time communication system
     - Desktop Applications (With node-webkit, electron and other frameworks to achieve)

Why use Nodejs it?

   Node as an emerging preceding frame, background language, there are many attractive places.

   Node for the first time into the Javascript to develop back-end server.

   Writing highly scalable server becomes easy and safe, and so on

Why learn Node.js?

    - Server-side development
    - Large front-end skills necessary
    - business needs

Where use Nodejs

   Back-end development 

Nodejs how to use it?

   Since Nodejs platform is run Javascript code in the back end, so, you must first install Node environment in this machine.

   Can enter the official website to download     https://nodejs.org/en/download/    (note the native operating system selection, installation)

   Proceed as follows:

    1. After the installation is complete, in the Windows environment, run "" cmd "" Open a command character. Input node -v, if the installation is successful, it will output the current Node version number.

    2. Continue the command line input node, Node.js into the interactive environment. You can enter any Javascript statement, enter the result.

    3. To exit Node.js environment, twice Ctrl + C.

         4. Before using Node.js, we should first know npm. (Infra)

 

 

 The modular Nodejs

  1. What is modular?
  2. Why use a modular it?
  3. Common modular specification, what does?
  4. How to use Nodejs inside the modular specification

 

  1. What is modular?

 

 

 

 

 

 

 

 

 

 

 

 

npm fact, Node.js package management tool (package manager)

    Because we develop on Node.js, we will use a lot of JavaScript code written by someone else. If we want to use a package written by someone else, always searching by name at the official website, download the code, extract, re-use, very cumbersome. So a centralized management tool emerged: put npm official website after everyone had put their own developed modules package, if you want to use, directly through npm installation can be directly used, there is no managed code which should be where to download.

        More importantly, if we want to use modules A, and module A turn depends on module B, module B in turn depends on module X and module Y, npm according dependencies, all dependent packages are downloaded and manage. Otherwise, manually manage on our own, certainly cumbersome and error-prone.

  

 

 

   

   

Guess you like

Origin www.cnblogs.com/hudunyu/p/11391187.html