Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- NodeJS



  How to handle ES6 modules in NodeJS

In modern JavaScript, there are two types of modules: ES6 module and CommonJS module used by NodeJS. These two types of module are not compatible. Many people would wonder how to load ES6 modules in their NodeJS project. This post will show how this can be done. Difference The syntax of the module being loaded is different. CommonJS modules are loaded with require() and exported with module.exports. ES6 modules are loaded and exported using import and export respectively. Merchanismwise require(...

   NODEJS,COMMONJS,ES6     2020-08-28 22:01:33

  Format JSON data on Ubuntu

JSON now becomes a very popular data format because of its simplicity and light-weight. Nowadays many RESTful APIs will offer a choice of exchanging JSON data between the server and client. Sometimes the data may not be formatted and it cannot be easily read by human beings. It's frequently desired that the unformatted JSON data should be formatted before read. Today we will show a few ways to format JSON data on Ubuntu. Assume we have a json file test.json with below content. { "title": "Test"...

   RUBY,PYTHON,NODEJS,JSON,JQ,PERL,LINUX,UBUNTU,YAJL     2016-08-17 11:05:09

  Write high quality JavaScript and CSS with SublimeLinter

SublimeLinter is a plugin for one of the front end editor--Sublime Text, it is used to highlight those syntax not conforming to standard or wrong, it supports JavaScript,CSS,HTML,Java,PHP,Python,Ruby and some more.This article will introduce how to configure SublimeLinter in Windows to validate JavaScript and CSS codes. Preparation Install Sublime Text package control tool : http://wbond.net/sublime_packages/package_control Install SublimeLinter with Sublime Text package control tool :https://gi...

   SublimeLinter,Sublime Text,Validation     2013-06-14 23:24:51

  The future smells like JavaScript

Of course I am only repeating what others are preaching about the recent rise of JavaScript. But I think the movement is significant and can't be overstated. And recent developments are really even making it more and more interesting. Nobody can deny hat JavaScript is the de facto programming language of Html5. Every other language trying to bolt itself onto Html5 looks like pure friction so far. And Html5 is looking upon a prospering future. Today we are used to some established JavaScri...

   JavaScript,Future,Node.js,Client-side     2012-02-03 08:06:43

  Why does LinkedIn migrate to NodeJS from Ruby?

Node.js, the server-side JavaScript-based software platform used to build scalable network applications, has been all the rage among many developers for the past couple of years. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. Because of these advantages, there are many websites are migrating to Node.js.One of them is LinkedIn. LinkedIn was initially built on Ruby...

   LinkedIn,NodeJS,Ruby     2014-03-21 23:39:25

  Generate first N prime numbers

Recently I am taking an online course named "Startup Engineering" on coursera. There is one assignment which is to use NodeJS to write a program to generate the first 100 prime numbers. This may be very easy for many people. Here I just want to share with you the code to generate not only the first 100 prime numbers. but also any number of prime numbers. Below is the code snippet: //Helper class to generate prime numbers var PrimeProcessor=(function(){ var primeArray=[]; functio...

   Algorithm,Prime number,NodeJS,coursera,JavaScript     2013-06-29 22:08:22

  Node.js: Five Things Every PHP Developer Should Know

I recently started working on a few Node.js applications. Coming most recently from PHP (and Drupal in particular), I found the transition to Node.js to be surprisingly easy. Pleasurable, in fact. But I had to learn to think differently about a few things. Below I list the five things I think every PHP developer should know about Node.js. 1. Node.js Is Built On Chrome's JavaScript Engine Google's browser, Chrome, has a notoriously fast JavaScript engine called V8. And this JavaScript engine ...

   PHP,Node.js,Developer,Feature     2012-02-09 07:37:48

  How One Missing `var` Ruined our Launch

Well, that was a veritable shitstorm (sorry for the language).  Long story short, MelonCard was featured today on TechCrunch (along with other500Startups companies, also on VentureBeat, Forbes, …) and everything broke all at once.  Every. little. thing.  We had rolled out a huge change to MelonCard over the last few days to make our site a seamless “everything just updates” look-good / feel-good product using NodeJS lo...

   JavaScript,NodeJs,jQuery,Variable,Scope,Global     2011-11-02 13:01:22

  What does a contemporary web developer need to know?

The early ages of web era mainly consisted of webpages of text and links. At that time,Netscape was the still dominant of web browser market. As a web developer, you could develop web apps(or better to call web pages) easily with knowledge of HTML only. But with the evolution of web, new technologies came out, we can see more robust web apps around us everywhere. Today as a web developer, the ability to run and configure a web server and edit HTML to create some simple web pages has lost almost ...

   Web design,Advice     2013-12-20 06:31:51

  Avoiding and exploiting JavaScript's warts

One's sentiment toward JavaScript flips between elegance and disgust without transiting intermediate states. The key to seeing JavaScript as elegant is understanding its warts, and knowing how to avoid, work around or even exploit them. I adopted this avoid/fix/exploit approach after reading Doug Crockford's JavaScript: The Good Parts: Doug has a slightly different and more elaborate take on the bad parts and awful parts, so I'm sharing my perspective on the four issues that ha...

   JavaScript,warts,Exploit,with,variable,this     2012-02-15 05:51:21