This service is a simple API that supports image upload and detects duplicated images by calculating the image hash, and saves them into the file system.

I have chosen Javascript because I’m familiarised with it and it’s a good choice when dealing with I/O operations.

Here’s a set of tools that I have used to make my job easier:

Gulp for running my tasks, it’s my favourite one and I won’t argue the pro/cons against grunt or other.

Babel because it’s the most mature transpiler and supports almost 100% of ES6.

Standard it’s very useful because forces all team members to use the same code style. Some people think that code style is personal but I disagree: standardize it turns the code more readable and makes life easier for the next guy who will work on it.


For me, HapiJs is the best framework to create Api’s in node. Why? Because is easy to learn, separates the logic from the framework, it’s easy to test using Lab and it’s pluggable! There are a lot of plugins that can make our life easier: swagger, authentication, logging, etc…

I choose Mongoose to manage the operations to MongoDb, because it’s easy, stable and supports native promises.

You can check the code on my GitHub

Like what you read? Give Marco Talento a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.