Handlebars Custom Helpers and Chaining

Handlebars is a popular templating engine for JavaScript and in this post we’ll have a look at how to write a custom helper. On top of that, we’ll also look at pre-compiling a part of the template and returning the compiled HTML from the helper. We’ll be using a simple express app with some handlebars […]

Building a Simple Searchable API with Express (Backend)

Express is still one of the most prominent server side frameworks for node. This little guide will show you how you can build a simple API and connect it with your frontend framework of choice. If you’re trying to build a site that features a list of items, stores, products or similar on your front […]

Express, Passport and JSON Web Token (jwt) Authentication for Beginners

This post is going to be about creating an authentication with JSON Web Tokens for your project, presumably an API that’s going to be used by Angular, Vue.js or similar frontend frameworks. We’re going to send the jwt with every request, meaning that we don’t rely on sessions, but simply put the token on every […]

How to: enable CORS in express.js (node.js)

Express.js is one of the most popular node.js frameworks for serving websites or building APIs. This article is about how to enable Cross Origin Resource Sharing, also known as CORS. For that we need to set the correct headers in the response, which allow a browser to make use of the data from any domain.

CigTrack Day #6: Security and bcrypt

I’m a fan of improvisation, Duct-tape and hacking things into what you want them to do speedily and without a lot of testing. One of the areas, where I wouldn’t follow this approach is security. Security is something many companies don’t take serious. Their servers get broken into, all their user’s data are stolen, leaked, […]