kernicPanel
23.0K views | +0 today
kernicPanel
JavaScript, Node Js, Git, Vim, and more…
Curated by Nicolas Clerc
Your new post is loading...
Your new post is loading...
Rescooped by Nicolas Clerc from #CodeReview
Scoop.it!

Express.js 4, Node.js and MongoDB REST API Tutorial

Express.js 4, Node.js and MongoDB REST API Tutorial | kernicPanel | Scoop.it

ere’s a brand new, revisited tutorial for Express.js 4, Node.js and MongoDB (Mongoskin) free-JSON RESTful API server.

Contents:

Node.js and MongoDB REST API OverviewREST API Tests with Mocha and SuperagentNPM-ing Node.js Server DependenciesExpress.js 4.x Middleware CaveatExpress.js and MongoDB (Mongoskin) ImplementationRunning The Express.js 4 App and Testing MongoDB Data with MochaConclusion and Further Express.js and Node.js Reading 

This Node.js, Express.js and MongoDB (Mongoskin) tutorial will walk you through writing the test using the Mocha and Super Agent libraries. This is needed for a test-driven development building of a Node.js free JSON REST API server.

The server application itself will utilize Express.js 4.x framework and Mongoskin library for MongoDB. In this REST API server, we’ll perform create, read, update and delete (CRUD) operations and harness Express.js middleware concept with app.param() and app.use() methods.


Via Jan Hesse, Ex FromTheLeft
more...
No comment yet.
Scooped by Nicolas Clerc
Scoop.it!

Testing in Node.js with Mocha - Brian Stoner

I recently migrated all of our server side Node tests at Instinct from Vows to Mocha.

I've been around the block with testing in Node, unable to find an approach that I really liked, until I started using Mocha. The elegant way it does async along with familiar BDD style syntax is really enjoyable to work with. It's made writing/maintaining our tests something I don't run from anymore.

more...
No comment yet.
Scooped by Nicolas Clerc
Scoop.it!

Testing Socket.IO with Mocha, Should.js and Socket.IO Client - Liam Kaufman

I’m currently in the midst of creating an application that utilizes Socket.IO for real-time communication between users.
more...
No comment yet.
Scooped by Nicolas Clerc
Scoop.it!

DailyJS: Testing with Mocha

DailyJS: Testing with Mocha | kernicPanel | Scoop.it

Mocha presents itself as an unassuming and lightweight library, but it actually goes far beyond the test frameworks I’m familiar with in Node. I’ve written literally hundreds of tests for various Node apps, and the experience hasn’t always been positive. Even popular test libraries lack functionality that asynchronous, database-driven web apps require for sane testing. My recommendation is to take Mocha seriously and give it a try — it’s surprisingly intuitive.

more...
No comment yet.
Scooped by Nicolas Clerc
Scoop.it!

Tutorial: JSON REST API server with Node.js and MongoDB using Mongoskin and Express.js | webapplog

Tutorial: building a JSON REST API server with Node.js and MongoDB using Mongoskin and Express.js utilizing Mocha and Super Agent for BDD/TDD.
more...
No comment yet.
Scooped by Nicolas Clerc
Scoop.it!

Nouveau regard sur les tests en Node.js avec Mocha, Should et Travis - Adaltas

Nouveau regard sur les tests en Node.js avec Mocha, Should et Travis - Adaltas | kernicPanel | Scoop.it
Aujourd’hui, j’ai finalement décidé de passer une peu de temps autour de Travis. Cette petite image verte en haut des pages d’accueil de projets GitHub m’intrigue de plus en plus ces derniers jours. En fait, pour être tout à fait honnête, ce n’est pas exactement ainsi que j’ai débuté ma soirée. Tout d’abord, après deux ans de bon et loyaux services, j’ai décidé d’abandonner Expresso pour donner une chance à Mocha. Et puisque je m’étais habitué aux quelques petites fonction dont Expresso enrichit le module assert, il m’a fallut y remédier, ce qui m’a conduit au module Should. Il me fut assez plaisant de voir comment ces deux derniers modules se complètent parfaitement l’un et l’autre, dans la plus pure tradition Unix: petit, puissant et bon citoyen.
more...
No comment yet.
Scooped by Nicolas Clerc
Scoop.it!

Testing Your Model with Mocha, Mongo, and NodeJS

Mongo is installed, our data is ported. Time to roll together our first model: the Customer. How do you model this stuff with MongoDB and Node?

more...
No comment yet.