Skip to main content

Posts

Simple HTTP Server Using Node & Express JS

/*******************************  * Import Required Modules  ****************************/ var express = require('express'); var bodyParser = require('body-parser'); var session = require('express-session'); var path = require("path") var app = express(); app.use(bodyParser()); app.use(bodyParser.json({limit: '10mb'})); app.use(bodyParser.urlencoded({limit: '10mb', extended: true, parameterLimit:50000})); var MemoryStore = session.MemoryStore; var sessionStore = new MemoryStore(); app.use(session({store:sessionStore, secret: 'secret', key: 'express.sid', cookie: { path: '/', httpOnly: true, maxAge: 8*60*60*1000} })); app.use(function (req, res, next) {     res.setHeader('Access-Control-Allow-Origin', '*');     res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE');     res.setHeader('Access-Control-Allow-Headers', 'X-R...

Socket.io

Socket.IO enables real-time bidirectional event-based communication. It works on every platform, browser or device, focusing equally on reliability and speed. Real-time analytics Push data to clients that gets represented as real-time counters, charts or logs. Binary streaming Starting in 1.0, it's possible to send any blob back and forth: image, audio, video. Instant messaging and chat Socket.IO's "Hello world" is a chat app in just a few lines of code. Document collaboration Allow users to concurrently edit a document and see each other's changes. USED BY EVERYONE From Microsoft Office, Yammer, Zendesk, Trello... to hackathon winners and little startups. One of the most powerful JavaScript frameworks on GitHub, and most depended-upon npm module. IMMENSELY POWERFUL, YET EASY TO USE Our getting started guide will show you how to create lots of amazing applications in fewer than 200 lines of code.

Node Js

Node.js is an open-source, cross-platform JavaScript run-time environment for executing JavaScript code server-side. Historically, JavaScript was used primarily for client-side scripting, in which scripts written in JavaScript are embedded in a webpage's HTML, to be run client-side by a JavaScript engine in the user's web browser. Node.js enables JavaScript to be used for server-side scripting, and runs scripts server-side to produce dynamic web page content before the page is sent to the user's web browser. Consequently, Node.js has become one of the foundational elements of the "JavaScript everywhere" paradigm, allowing web application development to unify around a single programming language, rather than rely on a different language for writing server side scripts. Though .js is the conventional filename extension for JavaScript code, the name "Node.js" does not refer to a particular file in this context and is merely the name of the product. Node...

Angular

Angular (commonly referred to as "Angular 2+" or "Angular 2") is a TypeScript-based open-source front-end web application platform led by the Angular Team at Google and by a community of individuals and corporations to address all of the parts of the developer's workflow while building complex web applications. Angular is a complete rewrite from the same team that built AngularJS. Angular is a framework for building client applications in HTML and either JavaScript or a language like TypeScript that compiles to JavaScript. Angular combines declarative templates, dependency injection, end to end tooling, and integrated best practices to solve development challenges. Angular empowers developers to build applications that live on the web, mobile, or the desktop. DEVELOP ACROSS ALL PLATFORMS Learn one way to build applications with Angular and reuse your code and abilities to build apps for any deployment target. For web, mobile web, native mobile and native...

Angular Js

Why AngularJS? HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop. Alternatives Other frameworks deal with HTML’s shortcomings by either abstracting away HTML, CSS, and/or JavaScript or by providing an imperative way for manipulating the DOM. Neither of these address the root problem that HTML was not designed for dynamic views. Extensibility AngularJS is a toolset for building the framework most suited to your application development. It is fully extensible and works well with other libraries. Every feature can be modified or replaced to suit your unique development workflow and feature needs. Read on to find out how. Data Binding Data-binding is an automatic way of updating the view whenever the model changes, as well as updating the mo...

Express Js

Express.js , or simply Express, is a web application framework for Node.js, released as free and open-source software under the MIT License. It is designed for building web applications and APIs. It is in fact the standard server framework for Node.js. Web Applications Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. APIs With a myriad of HTTP utility methods and middleware at your disposal, creating a robust API is quick and easy. Performance Express provides a thin layer of fundamental web application features, without obscuring Node.js features that you know and love. Frameworks Many popular frameworks are based on Express.

MongoDB

MongoDB is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas. MongoDB is developed by MongoDB Inc., and is published under a combination of the GNU Affero General Public License and the Apache License. Main features Ad hoc queries MongoDB supports field, range queries, regular expression searches.[8] Queries can return specific fields of documents and also include user-defined JavaScript functions. Queries can also be configured to return a random sample of results of a given size. Indexing Fields in a MongoDB document can be indexed with primary and secondary indices. Replication MongoDB provides high availability with replica sets.[9] A replica set consists of two or more copies of the data. Each replica set member may act in the role of primary or secondary replica at any time. All writes and reads are done on the primary replica by default. Secondary replic...