background preloader


Facebook Twitter

To Engineers Who Tried to Use Jade Template Engine and Can’t Get Started. When I started working at Storify as a Node.js Engineer.

To Engineers Who Tried to Use Jade Template Engine and Can’t Get Started

The tech stack was Express and Jade. I hate to admit it, but I struggled with Jade a lot! Before, I mostly worked with Underscore, and Handlebars. I attempted to modify some HTML in the Jade templates. Other times I would only change the text. I was failing miserably to learn by trial and error. Tip: Right now, I am running a holiday deal on my biggest online course. Smart people learn by their mistakes, and wise people learn from others. A template engine is a library or a framework that uses some rules/languages to interpret data and render views. In web apps, it’s beneficial to use templates because we can generate an infinite number of pages dynamically with a single template! If we go back to the diagrams in the previous chapter (traditional vs.

In this article, I’ll cover the following: Jade syntax and featuresJade standalone usage Jade Syntax and Features Tags. Advanced chat using node.js and - Episode 1. A few months ago I wrote an article to show the capabilities of - a very simple & basic chat application.

Advanced chat using node.js and - Episode 1

I decided to beef this up and make it a useful tool that, potentially, companies could use that as well internally as a chat/conferencing tool. As always there will be several pieces to the article series where I will try to explain some cool code features as well as a cool technology called 'WebRTC'. First of all let's have a look at the requirements; this application should: Allow people to connect the server Allow people to create rooms (one person can create only one room) Allow other people to join the created rooms Send messages to each other within the room Handle the disconnect event from a room Allow the room's owner to remove the room Handle the disconnect from the server Most of the functionality was already implemented in the previous version of this chat app but for the sake of completeness I'm going to explain all parts again. How to share a session between Express v4 and 1.3.2.

Node-resources/router.js at master · hgarcia/node-resources. Webapplog: [programming weblog] Connecting and Working with MongoDB with Node & Express. Every web application needs a place to store its critical data.

Connecting and Working with MongoDB with Node & Express

Node and Express apps are no exception. One of the most popular NoSQL databases in the last few years, especially when working with Node, is MongoDB. As you grow, your needs grow. You need more than just to connect to your database and get some stuff. REST routing multiple files node js. How to separate routes on Node.js and Express 4?

Best practices for Express app structure. Node and Express don’t come with a strict file and folder structure.

Best practices for Express app structure

Instead, you can build your web app any way you like. This is great, especially for small apps. It is easy to start, learn and experiment. However, as your application grows in size and complexity, things might get confusing. Your code becomes messy. You would like to have a file structure where different files and folders are responsible for different tasks.

Node.js official docs & community. Architecting a Secure RESTful Node.js app. In this post, we will take a look at architecting a Node.js app that will act as a REST API server for all of our clients.

Architecting a Secure RESTful Node.js app

We will be implementing a Token Based Authentication to authenticate and authorize the client to access the application data. This application design is targeted at systems that would like to implement its own REST API with a custom authentication. Token-Based Authentication With AngularJS & NodeJS. Des applications ultra-rapides avec Node.js.

Creating a Simple RESTful Web App with Node.js, Express, and MongoDB. Tutorial - Getting Started With Node.js, Express, MongoDB. How To Node - NodeJS. Node.js hosting, cloud products and services. Authentification et WebSocket, avec Node.JS, Express, et Socket.IO. ATTENTION : certaines portions de code présentées ici sont valables pour Express 2.x et ne fonctionnent plus avec Express 3.x.

Authentification et WebSocket, avec Node.JS, Express, et Socket.IO

Il s’agit principalement de la partie traitant du parsing de cookie, l’articles reste à 95% valable, mais vous trouverez les détails pour Express 3 dans cet article → Authentification WebSocket avec les sessions Express 3.x et Socket.IO La première fois qu’on utilise les websockets, on se dit que c’est compliqué (pas tant que ça en fait). Puis on utilise, et on se dit que c’est vraiment super simple Et puis un jour on aimerait bien sécuriser la connexion au socket, parce que la partie « temps réel » nécessite d’être authentifié, ou simplement parce qu’il faut un pré-requis (comme avoir donné son nom avant de pouvoir chatter) avant que l’écoute ne démarre réellement.

Sommaire: Note: si vous connaissez déjà bien Express et Socket.IO, vous êtes encouragé à sauter directement au chapitre 4 (éventuellement, le chapitre 2 peut rester intéressant). Pré-requis. Express - guide. Getting started With node installed (download), get your first application started by creating a directory somewhere on your machine: $ mkdir hello-world In this same directory you'll be defining the application "package", which are no different than any other node package.

Express - guide

Node Js + Express Js + Jade + Socket I/O + Sails Js. Node.js is a server-side software system designed for writing scalable Internet applications, notably web servers.

Node Js + Express Js + Jade + Socket I/O + Sails Js

Programs are written on the server side in JavaScript, using event-driven, asynchronous I/O to minimize overhead and maximize scalability (source : wikipédia) Node.js est un système logiciel côté serveur conçu pour écrire des applications Internet évolutives, les serveurs Web, notamment. Les programmes sont écrits sur le côté serveur en JavaScript, en utilisant la programmation évènementielle, E / S asynchrone pour minimiser les temps d’attentes et optimiser l’évolutivité. Jade - Template Engine. Node.js for Beginners. Tutorial. The Node Beginner Book » A comprehensive Node.js tutorial. Node.js. Des applications ultra-rapides avec Node.js.