background preloader

Node

Facebook Twitter

Top 10 Mistakes Node.js Developers Make. Test driven Development of Web Apps in Node.Js. Learn All The Nodes. Secure Node Apps Against OWASP Top 10 - Injection - Scott Smith. Welcome to part 1 of the OWASP security series In this multipart series, we will explore some of the the OWASP top web application security flaws including how they work and best practices to protect your application from them.

Secure Node Apps Against OWASP Top 10 - Injection - Scott Smith

The focus will be on Express web applications in Node, but the principles shown can be applied to any framework or environment. This part of the series will cover Injection. Injection So what exactly is an Injection attack? An attacker can be anyone capable of sending untrusted data to the system such as external users, internal users, administrators, etc. Injection attacks can be very bad for an application. SQL Injection When you hear about Injection attacks, the one you might think of first is SQL injection. Most commonly known as an attack vector for web applications, SQL injection can also be used to attack any application using SQL databases. Some of the systems that can be affected by this attack are SQL Server, PostgreSQL, MySQL, and any SQL based database. Beer Locker: Building a RESTful API with Node - Username & Password - Scott Smith. Welcome to part 6 of the Beer Locker series In our previous article we explored implementing Digest authentication in place of Basic.

Beer Locker: Building a RESTful API with Node - Username & Password - Scott Smith

This article will now delve into implementing username and password authentication using the passport-local module. There is a new set of code this article will start from rather than where we left off in the previous article. The previous article required us to remove our password hashing which we don’t have to do for username/password. You can find the starting point of code here on GitHub. The only difference here is that we added back password hashing and verification along with using Basic instead of Digest for our authentication. Username and Password One of the most widely used authentication mechanism on the web is via a username and password submitted in a POST request or in the query string. This authentication mechansim can be used for APIs but it requires submitting the credentials on each call. Update our Auth Controller Yep, you heard me right.

#13 Build a Shopping Cart with Meteor Javascript in under 60 minutes. How to install grunt on Ubuntu 14.04 - SaltyCrane Blog. Saving changes - git-commit. Git add The git add command adds a change in the working directory to the staging area.

Saving changes - git-commit

It tells Git that you want to include updates to a particular file in the next commit. However, git add doesn't really affect the repository in any significant way—changes are not actually recorded until you run git commit. In conjunction with these commands, you'll also need git status to view the state of the working directory and the staging area. Usage git add <file> Stage all changes in <file> for the next commit. git add <directory> Stage all changes in <directory> for the next commit. git add -p Begin an interactive staging session that lets you choose portions of a file to add to the next commit.

Discussion The git add and git commit commands compose the fundamental Git workflow. Developing a project revolves around the basic edit/stage/commit pattern. Grunt JS Tutorial From Beginner to Ninja - Adrian Mejia’s Blog. Sometimes you find yourself doing the same tasks again and again, especially during web development.

Grunt JS Tutorial From Beginner to Ninja - Adrian Mejia’s Blog

It is time to automate repetitive tasks and use that time in more creative activities. This is where Grunt comes in. Grunt is a popular task runner that runs on NodeJS. It can minify CSS/JavaScript, run linting tools (JSHint, JSlint, CSSlint), deploy to server, and run test cases when you change a file to name a few. All the information I found about Grunt and similar Javascript test runners were too verbose and not very helpful to get started quickly. Beginner: Grunt.js 101 Grunt.js is a Javascript task runner. Hello Wold from GruntJS You need to install Node.js and NPM to follow along with this example. If you run the grunt command you will get a message like this: So, let’s create the Gruntfile.js file: If you run grunt again, you will see a message. We can chain multiple grunt tasks by using and array.

Reference 1: Grunt tasks, config and warnings.