Posts

Showing posts from April, 2017

Generate a MeanJS App using Yeoman Generator

Image
First let's see what is MEANJS, then we gonna walk you through a simple tutorial on how to develop a meanjs app using yo generator.  What is MEAN.JS? MEAN.JS is a full-stack JavaScript solution that helps you build fast, robust, and maintainable production web applications using MongoDB, Express, AngularJS, and Node.js. Why MEAN.JS? MEAN.JS will help you getting started and avoid useless grunt work and common pitfalls, while keeping your application organized. Our goal is to create and maintain a simple and readable open-source solution that you can use and trust in your projects. One of the most frequently asked features from MEAN users is a way to scaffold their applications.So using yeoman generator, which includes a set of simple tools, can make your life easy as a developer. As the first step you have to install yo scaffolding tool, npm install -g yo This is only the tool, now we need to install a sub-generator which is the one we need in this tutorial. ...

Introduction to NodeJS Coding - Part 2

Image
Here we gonna create a simple HTTP server with REST capabilites. Hope you guys followed my previous introductory coding blog on NodeJS. If not click Here , First let's see what is a Web Server, A Web server is a program that uses HTTP (Hypertext Transfer Protocol) to serve the files that form Web pages to users, in response to their requests, which are forwarded by their computers' HTTP clients. Dedicated computers and appliances may be referred to as Web servers as well. [whatIs.com] So, let's create one, First create a JavaScript file as 'server.js'. Import the http module from the core libraries. const http = require('http'); Create a httpServer that listens to port 3000 and return HTML with Hello World text in h1 header upon GET request.  Check the output of the code by running the code and accessing http://localhost:3000 in browser.  So let's improve our server,  adding a POST request that accepts form field name and ...

Introduction to NodeJS Coding - Part1

Image
Here we gonna talk about main features of NodeJS runtime and JavaScript library. Hope you guys followed my previous introductory blog on NodeJS. If not click Here , As with any programming language, platform, or tool that doesn't come bundled with Windows, getting up and running with Node.js takes some initial setup before you can start hacking away. In my experience, though Node.js has a far better installation experience on Windows than virtually any other language, platform, or tool that I've tried to use - just run the installer, and you're good to go. First install node on your computer, Open the official page for Node.js downloads and download Node.js for Windows by clicking the "Windows Installer" option Run the downloaded Node.js .msi Installer - including accepting the license, selecting the destination, and authenticating for the install. This requires Administrator privileges, and you may need to authenticate To ensure Node.js has bee...

Intoduction to NodeJS

Image
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast and scalable network applications. 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. [TutorialsPoint] Here's a few key point regarding NodeJS, Developed by Ryan Dahl.   Created with the aim of creating real-time websites with push capabilities (websockets). NodeJS is an open source, cross platform runtime environment for server-side and networking applications. Build on V8 engine, Chrome’s JavaScript engine. Uses event-driven, non-blocking I/O model which makes NodeJS lightweight and efficient. Ideal for data-intensive real-time applications that run across distributed devices. NodeJS comes with several JavaScript libraries that help basic programming. NodeJS eco-system ‘npm’ is the largest in the world for open source libraries.   Let's...