background preloader

Node

Facebook Twitter

ORM

Top 10 Mistakes Node.js Developers Make. Authentication. Winser by jfromaniello. Run node.js applications as windows services using nssm.

Winser by jfromaniello

Installation $ npm install winser Command line arguments -h, --help output usage information -V, --version output the version number -i, --install install the node application as a windows service -r, --remove remove the windows service for the node application -x, --stop stop the service before uninstalling -s, --silent supress any information in the console -c, --confirmation ask for confirmation before installing/uninstalling -p, --path [path] path to the node application you want to install as a service [current directory] Method 1 I really like this method, in the package.json: Then, in order to install a node application in lets say a server I will do this: npm install The arguments in the postinstall script means: i install s silent, don't display any information c ask for confirmation.

The arguments in the preuninstall script means: x stop the service before uninstalling r remove the service s silent, don't display any information. 10 modules NodeJS pour simplifier le développement d'applications Web. Créer une application Web sur NodeJS peut s’avérer difficile si on ne connait pas les modules qui pourront nous simplifier la vie.

10 modules NodeJS pour simplifier le développement d'applications Web

Voici une liste de certains modules qui m’ont aidé à atteindre les buts fixés : Créer des applications Web extraordinaires ! Tout d’abord, si vous ne connaissez pas NodeJS, voici une traduction libre de la description officielle : « Node.js est une plate-forme construite sur le moteur JavaScript de Chrome pour construire facilement des applications réseau rapides et évolutives.

Node.js utilise un modèle événementiel, aux E/S non bloquantes qui le rend léger et efficace, idéal pour les applications de données intensives en temps réel qui sont exécutées à partir de dispositifs distribués. » Pour de plus amples détails, vous pouvez consulter le site de NodeJS. La liste express Plus qu’un simple module, ExpressJS est une plateforme de développement d’applications Web pour NodeJS, à l’instar de Sinatra pour Ruby. extended-console mongoose. How To Safely Store A Password. 31 Jan 2010 Use bcrypt Use bcrypt.

How To Safely Store A Password

Use bcrypt. Use bcrypt. Use bcrypt. Why Not {MD5, SHA1, SHA256, SHA512, SHA-3, etc}? These are all general purpose hash functions, designed to calculate a digest of huge amounts of data in as short a time as possible. A modern server can calculate the MD5 hash of about 330MB every second. And that’s without investing anything. If you’re willing to spend about 2,000 USD and a week or two picking up CUDA, you can put together your own little supercomputer cluster which will let you try around 700,000,000 passwords a second. Salts Will Not Help You It’s important to note that salts are useless for preventing dictionary attacks or brute force attacks. Salt or no, if you’re using a general-purpose hash function designed for speed you’re well and truly effed. bcrypt Solves These Problems How?

Node.js. Beer Locker: Building a RESTful API with Node - OAuth2 Server - Scott Smith. In our previous article we ended wtih a functional API capable of creating user accounts, locking down API endpoints, and only allowing access to a user’s own beer locker.

Beer Locker: Building a RESTful API with Node - OAuth2 Server - Scott Smith

In this part we will dive into creating an OAuth2 server and allowing access to API endpoints for the authorized user or authorized applications. We will do this by integrating OAuth2orize into our application. Security I realized I wasn’t explicitly clear about what steps ones should take in regards to security. This article was meant more on how to get an OAuth2 server up and running.

Application Client The first thing we need to do is add a new model, controller, and endpoints to allow us to create new application clients. Create a new file called client.js in the models directory and add the following code to it. There isn’t too much going on here that differs from what we already did in previous articles. The next thing we will add is the controller to facilitate adding and viewing application clients.

Access Tokens.