Writing a Node.js module in TypeScript

Decorative title image

One of the best things about Node.js is its massive module ecosystem. With bundlers like webpack we can leverage these even in the browser outside of Node.js. Let’s look at how we can build a module with TypeScript usable by both JavaScript developers and TypeScript developers. Before we get started make sure that you have Node.js installed – you should ideally have a version of 6.11 or higher…. Read More

Deploy .NET Core with Docker and now.sh

Image with .NET Core, Docker and Zeit logo

Bundling up your application into a Docker container has many benefits including making deployments really easy without being bound to a particular cloud host. In this post we will containerize a .NET Core application and deploy it using Docker. Setup Before we can get started we need a couple of dependencies installed. Make sure you have the latest .NET Core SDK installed. You can download the SDK for your operating… Read More

Phone Number Verification without Regular Expression

Having invalid data in your database can be a nightmare. Especially if you are intending to use the data to do things like sending important SMS to your users. A typical solution is to use /Regular Expressions/gi to make sure the value at least looks like a phone number, but that still doesn’t prevent someone from entering a fake number and supporting international numbers makes it even… Read More

How To Set Environment Variables

There are some things we just shouldn’t share with our code. These are often configuration values that depend on the environment such as debugging flags or access tokens for APIs like Twilio. Environment variables are a good solution and they are easy to consume in most languages. Environment Variables???? Environment variables, as the name suggests, are variables in your system that describe your environment. The most well known… Read More

SMS Versenden mit Node.js und Twilio

Mit nur 16 Zeilen Code (inklusive Leerzeilen) kannst du SMS mit Twilio verschicken:

Soweit so gut. Aber bevor du jetzt den Code direkt in dein Projekt kopierst, müssen wir noch ein paar Schritte erledigen, damit der Code auch funktioniert. Was Muss Ich Tun? Bevor du anfangen kannst, SMS mit Twilio zu versenden, musst du zuerst einen Twilio Account erstellen. Du kannst dich hier kostenlos anmelden. Da wir… Read More

A quick guide to JavaScript Promises

When you are writing JavaScript, callbacks are one of the most confusing concepts. Promises are the new approach to improve working with async code. One of the biggest problems of callbacks is the chaining of different asynchronous activities. You end up calling anonymous function after function to pass around values. The result is an unmaintainable “callback hell”. Promises try to solve this problem but can be a bit confusing… Read More

Writing a bot for Programmable Chat in Node.js

It seems like bots are the new hot thing that every chat supports. They usually augment conversations or they can perform tasks for the user. We will add to an existing Programmable Chat chat a simple bot that will return us a GIF whenever we ask for it. Getting Your Initial Chat Up And Running We will be working off an existing chat application. Before we get started with… Read More