The first step will be to create a method to guess if the HTTP request comes from HTTP or HTTPS (secure or not secure). In some context like AWS or Heroku you will have to ask by the header x-forwarded-proto instead of req.secure. Have in mind that req.secure will return always false if there is … Continue reading Redirect all requests from HTTP to HTTPS un Node.js and Express
Sometimes we need to configure a secure environment locally to test how our application reacts on HTTPS.
Formally, TDD means Test Driven Development but in your day by day means "to write tests before your main code". Let's use our random function example to explain TDD steps.
Images are the most efficient means to showcase a product or service on a website
I know: there are several good modules in npm world but sometimes we don't have enough flexibility in terms of customizations. In my case I invested more time trying to tweak an existing module than develop my own
A simple example about how to connect to a PostgreSQL database using Node.js
Image and video management is almost present in our projects. I would like to share my experience around this problem.
Let's build a small site in Node.js using Express that will have one protected page Http auth basic prompt dialog We are going to use express generator to generate some scaffolding. If you didn't install it just type this command to install it globally but if you already know all this stuff you might skip … Continue reading Http auth basic in Node js and Express