Chaos Ajax - is your application ready to fail?

JavaScript

You are creating an application that shows data to the user - doesn't matter if he is searching for some specific thing or he is only listing everything you have. What happens if the server responds with empty array? Or with error? Will your application show only empty space or an error message?

Continue reading...

Introduction to Sequelize ORM

JavaScript Node.js Example project

This is about the basic usage of Sequelize ORM – how to create migrations, models, seeders and how to get the data from the database. Everything is explained on an example project, which you can find on GitHub.

Continue reading...

Google Code Jam 2017: Oversized Pancake Flipper

JavaScript Algorithms Google Code Jam

Last year, the Infinite House of Pancakes introduced a new kind of pancake. It has a happy face made of chocolate chips on one side (the “happy side”), and nothing on the other side (the “blank side”).

You are the head cook on duty. The pancakes are cooked in a single row over a hot surface. As pa...

Continue reading...

Express server with JWT authentication

JavaScript Node.js Express JWT Example project

I needed to create a simple server, that would have one “public” route /login and other routes are available only for users with valid JWT token.

That means, the user is allowed to log into the system and then get any data from it. If he is not logged in and he tries to get some data, he only get an error message and 401 ( Unauthorized ) status code will be returned.

Continue reading...

Website screenshots and visual diffs

JavaScript Node.js

Maybe you know the situation when you deploy some page, check it fastly and go away from the office feeling good about your job done. Then a colleague calls you and you hear “What did you do? It is not working!”.

Continue reading...