background preloader

NODE.JS

Facebook Twitter

Learn to Use the New Router in ExpressJS 4.0 ♥ Scotch. With the new ExpressJS 4.0 just being released last week, there are many changes that have come with it.

Learn to Use the New Router in ExpressJS 4.0 ♥ Scotch

These changes will affect how we build Node and MEAN stack apps in the future. Since Express has a such a large presence in our Node applications, let’s take a look at how we can use the new features in our applications, specifically the Router. Overview. Gentlenode. Intuitive Company - Gulp vs. Grunt. Posted by Keith If you’ve been involved in web development at any length over the last few years, you’ve likely used Grunt to simplify your build process.

Intuitive Company - Gulp vs. Grunt

If you haven’t been introduced to it, Grunt is a Javascript build tool that runs on Node and is configured to automate tasks within your source project. Using TaskRunners built from core functionality or plugins developed by folks like you and I, Grunt can compile SASS or LESS into CSS, lint Javascript, run unit tests, or simply copy files to a target directory. There are literally thousands (seriously… Look here) of plugins that can make your life easier, provide consistency, and make you a more productive developer. Up until the middle of 2013, Grunt was effectively the only build tool available… Enter Gulp.js. Choose: Grunt, Gulp, or npm? Node.js Quick Start. 1. Setup From the Codio Dashboard, select the 'Create Project' tab.Enter a name for your project.From the dropdown list, select 'Empty project' then press 'Create project'.You will now be taken to the IDE. 2.

Write some Code. Turtle.io. Elastic node.js web server / API server turtle.io was created to reduce resource requirements, and simplify creation & deployment of modern web applications & API facades.

turtle.io

Unlike other web servers, turtle.io is extremely easy to configure. Middleware Connect middleware allows you to create custom applications easily. Virtual Hosts Designed to host many websites and APIs from a single server. Simplify your stack turtle.io can replace Apache, NGINX, etc., in your application stack. Nodeschool.io. NodeCloud - Node.js resources. Hapi.js v4.x.x. Tag Archive for "node-js" Handlebars.js: Minimal Templating on Steroids. Jade - Template Engine. Introduction.

Jade - Template Engine

Tutorial - Getting Started With Node.js, Express, MongoDB. Write a todo list with Express and MongoDB. A todo list website is a good practice to learn a programing language or a framework.

Write a todo list with Express and MongoDB

It shows you how to create, read, update and delete records. In this post we are going to use Express as our application framework and MongoDB as our data store. A fast, modular Node.js web framework dedicated to building realtime single-page apps. Express.js Guide: The Comprehensive Book on Express.js. Node.js: Step by Step. Todo App with Express.js/Node.js and MongoDB.

Note: This tutorial is a part of Express.js Guide: The Comprehensive Book on Express.js.

Todo App with Express.js/Node.js and MongoDB

Todo apps are considered to be quintessential in showcasing frameworks akin to famous Todomvc.com for front-end JavaScript frameworks. In this example, we’ll use Jade, forms, LESS, AJAX/XHR and CSRF. In our Todo app, we’ll intentionally not use Backbone.js or Angular to demonstrate how to build traditional websites with the use of forms and redirects. In addition to that, we’ll explain how to plug-in CSRF and LESS. Example: All the source code is in the github.com/azat-co/todo-express for your convenience.

Here are some screenshots of Todo app in which we start from a home page: There’s an empty list (unless you played with this app before): Now we can add four items to the Todo List: Mark one of the tasks as “done”, e.g.. Going to the Complete page reveals this done item: Deletion of an item from the Todo list is the only action performed via AJAX/XHR request. Scaffolding As usual, we start by running. Todo App with Express.js/Node.js and MongoDB. Tutorial - Getting Started With Node.js, Express, MongoDB. Node.js, Require and Exports. Back when I first started playing with node.js, there was one thing that always made me uncomfortable.

Node.js, Require and Exports

Embarrassingly, I'm talking about module.exports. I say embarrassingly because it's such a fundamental part of node.js and it's quite simple. In fact, looking back, I have no idea what my hang up was...I just remember being fuzzy on it. Assuming I'm not the only one who's had to take a second, and third, look at it before it finally started sinking in, I thought I could do a little write up. In Node, things are only visible to other things in the same file.

Var x = 5; var addX = function(value) { return value + x; }; Another file cannot access the x variable or addX function. Now, before we look at how to expose things out of a module, let's look at loading a module. Var misc = require('. Of course, as long as our module doesn't expose anything, the above isn't very useful. What do module.exports and exports.methods mean in NodeJS.

Node.js: Step by Step. Tutorial - Explaining the module export system of nodejs by example. Johan Coppieters - Lector Web Development Howest - Brugge In this short note I try to explain the usage of the 'module.exports' object when using 'require' in a nodejs script.

Tutorial - Explaining the module export system of nodejs by example

There is also a shorthand 'exports', which is an alias to 'module.export', don't use is, it is confusing. In your module you can add something to the object 'module.exports'. The require function in a script using your module, will return this same object (with all the things in it, that you added, variables, functions, objects, ...) Node.js for Beginners. Node.js in a Nutshell - Stirring Interactive. Share: twitter linkedin pinterest It is a web server built on the open source V8 JavaScript engine from Google, which allow you to right server side JavaScript if you require more information please visit the Node.js website.

Node.js in a Nutshell - Stirring Interactive

What is the purpose of NodeJS module.exports and how do you use it. Getting started with Node.js, Express and Jade using the WebStorm IDE » Matt Palmerlee. Node.js Over the last few weeks I’ve been experimenting with Node.js and learning about how to use some of the great packages written for it.

Getting started with Node.js, Express and Jade using the WebStorm IDE » Matt Palmerlee

Node.js is a popular framework for building scalable server-side applications in JavaScript. To achieve high concurrency and scalability, Node.js leverages JavaScript’s event loop and function callbacks for longer running processes so that complex concurrent thread locking logic is not required. Manuel Kiessling’s Node Beginner Book goes through a great Node.js tutorial and explains in detail how to call long running processes (such as a database query or disk I/O operation) and not cause the request to block other operations. How to use exports in NodeJS - Liang Zan - Blog. How to use exports in NodeJS - Liang Zan - Blog. Node.js is taking over the Enterprise – whether you like it or not.

Node.js.