Skip to content

Instantly share code, notes, and snippets.

@tarekahsan709
Last active October 5, 2017 09:09
Show Gist options
  • Save tarekahsan709/5e97dee112a3b82c29be1c848c3468e0 to your computer and use it in GitHub Desktop.
Save tarekahsan709/5e97dee112a3b82c29be1c848c3468e0 to your computer and use it in GitHub Desktop.

Some basic node js knowledge.

https://docs.nodejitsu.com/articles/getting-started/

What is REPL(Read, Eval, Print, Loop) ?

A Read-Eval-Print Loop (REPL) is an interactive interpreter to a programming language. https://stackoverflow.com/questions/13603021/what-is-a-repl-in-javascript

And for node it is the Node.js shell; any valid Javascript which can be written in a script can be passed to the REPL. It can be extremely useful for experimenting with node.js, debugging code, and figuring out some of Javascript's more eccentric behaviors. https://nodejs.org/api/repl.html

My tasks

  1. Read all tutorial about node js.
  2. Read about express.
  3. Go through all express application I have.
  4. Then go for online test.
  5. Review all my gist.
  6. Apply remote job.

It is not advisable to use Node.js for CPU intensive applications.

A Node.js application consists of the following three important components −

1.Import required modules − We use the require directive to load Node.js modules.

2.Create server − A server which will listen to client's requests similar to Apache HTTP Server.

3.Read request and return response − The server created in an earlier step will read the HTTP request made by the client which can be a browser or a console and return the response.

What is require ?

https://docs.nodejitsu.com/articles/getting-started/what-is-require/

What are Event Emitters?

In node.js an event can be described simply as a string with a corresponding callback. An event can be "emitted" (or in other words, the corresponding callback be called) multiple times or you can choose to only listen for the first time it is emitted. So a simple example ran on the node REPL:

https://docs.nodejitsu.com/articles/getting-started/control-flow/what-are-event-emitters/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment