Marcus Node Bits - supertest is a nice way to test an api'

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them mocha is cool both as framework and test runner Should is a nice way to do asserts monk is an easy way to access mongo Express is best without generators supertest is a nice way to test an api - this post This post is about a testing framework for HTTP: supertest. Really, I shouldn’t need to write anything more after stating the name of the module. That’s SUPER testing people. That’s all we really need… It’s called supertest since it...
Read More

Marcus Node Bits - Express is best without generators

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them mocha is cool both as framework and test runner Should is a nice way to do asserts monk is an easy way to access mongo Express is best without generators - this post supertest is a nice way to test an api This post is about the most commonly used web framework in Node: Express. Node in itself is pretty cool and the three-line web server is mind blowing at first sight. Pretty soon though you want something that...
Read More

Marcus Node Bits - monk is an easy way to access MongoDb

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them mocha is cool both as framework and test runner Should is a nice way to do asserts monk is an easy way to access mongo - this post Express is best without generators supertest is a nice way to test an api This post is about monk, a nice framework that makes accessing MongoDb really easy. When doing database work with Node, the default option seems to be MongoDb. This is of course very natural since Mongo itself is Javascript...
Read More

Marcus Node Bits - Should is a nice way to do asserts

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them mocha is cool both as framework and test runner Should is a nice way to do asserts - this post monk is an easy way to access mongo Express is best without generators supertest is a nice way to test an api This post is about an assertion framework that I’ve come to love; should.js. The thing with most Node packages is that they are quite small, often around 100-200 lines. They, in turn, make...
Read More

Marcus Node Bits - mocha is cool both as framework and test runner

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them mocha is cool both as framework and test runner  - this post Should is a nice way to do asserts monk is an easy way to access mongo Express is best without generators supertest is a nice way to test an api When it comes to testing frameworks on the javascript and node stack it’s an abundance of choices, just like for any of your needs. Once again you need to look around, ask around and make up your...
Read More

Marcus Node Bits - Callback function is cool stuff, and I even know how to write them

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them - this post mocha is cool both as framework and test runner Should is a nice way to do asserts monk is an easy way to access mongo Express is best without generators supertest is a nice way to test an api This is not Node related but rather a Javascript thing that was something that I had a real hard time with at first. And I know that I should learn about promises, but I haven’t yet. Functions...
Read More

Marcus Node Bits - Git is not that hard, but I need to refresh my knowledge

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge - this post Callback function is cool stuff, and I even know how to write them mocha is cool both as framework and test runner Should is a nice way to do asserts monk is an easy way to access mongo Express is best without generators supertest is a nice way to test an api This post is not at all about Javascript or Node. But rather about git, that I use when doing Node… I’m using git for source control. That statement is more a less a given these days. Ha...
Read More

Marcus Node Bits - Package.json is a mighty tool

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages Package.json is a mighty tool - this post Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them mocha is cool both as framework and test runner Should is a nice way to do asserts monk is an easy way to access mongo Express is best without generators supertest is a nice way to test an api This post is about the package.json file that is more than first meets the eye. All node.js projects with any self-respect has a package.json. All npm-modules must have one. It’s a manifest file that holds various meta-data...
Read More

Marcus Node Bits - npm is not only for getting packages

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages - this post Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them mocha is cool both as framework and test runner Should is a nice way to do asserts monk is an easy way to access mongo Express is best without generators supertest is a nice way to test an api This post is about the Node Package Manager, npm, and some of it’s many features. Node is really cool, but without it’s package management system, npm, and the plethora of packages out there it would be pretty...
Read More

Marcus Node Bits - Doing stuff in the terminal is not scary at all

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all - this post npm is not only for getting packages Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them mocha is cool both as framework and test runner Should is a nice way to do asserts monk is an easy way to access mongo Express is best without generators supertest is a nice way to test an api This post is about the terminal and how I got to use it more and more, with just a couple of simple commands. I’m a Microsoft developer and is used with Visual Studio. Very nice, very integrated...
Read More