GithubHelp home page GithubHelp logo

jasondavis / nodejsworkspace Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rajanpupa/nodejsworkspace

0.0 2.0 0.0 1.51 MB

getting started with nodejs projects

JavaScript 80.65% HTML 18.90% CSS 0.44%

nodejsworkspace's Introduction

nodejsWorkspace

getting started with nodejs projects

This workspace will contain projects, on the increasing complexity basis of nodejs.

Node is a emerging language. Its mostly beneficial because of the following reasons.

  • It mostly required less memory to run compared to java and similar high level languages
  • It is totally based on javascript, and runs very fast
  • lots of libraries are available

Few common things about node

  • Non Blocking IO. (In node, io results are handled in callback functions rather then blocking the thread.)
  • Nodejs uses module architecture, which is similar to library in c. eg. http module contains functions specific to HTTP.
  • Including a module is easy
// This causes Node to search for a node_modules folder in our application's directory
// will search for global module if not found there
var http = require('http');

// can also pass actual file path
var myModule = require('./myModule.js');
  • Modules are encapsulated pieces of code. The code within a module is mostly private
  • exports object is used to expose functions outside the module
var PI = Math.PI;

exports.area = function (r) {
  return PI * r * r;
};

exports.circumference = function (r) {
  return 2 * PI * r;
};
  • The global scope in Node is GLOBAL (as opposed to window in the browser), and you can easily create a global variable of function by omitting the var keyword
  • Node.js has a package manager, called Node Package Manager (NPM)
  • To install a module
npm install module_name

References

http://code.tutsplus.com/tutorials/nodejs-for-beginners--net-26314

nodejsworkspace's People

Contributors

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