Photo by Sasha Freemind on Unsplash

We’ll build a back end app starter using TypeScript, compile it to JavaScript(ES2019), and deploy it to Heroku.

We will use:

  • Express: Web framework for Node.js

Let’s create a folder for our project:

mkdir my-typescript-app
cd my-typescript-app

Let’s install TypeScript and the types for Node.js as dev dependencies.

npm i -D typescript @types/node@12


My goal in this tutorial is to show how to structure React components around forms. In order to demonstrate this, I’d like to build a simple Newsletter subscription form.

The Plan

The form contains the email address input and the submit button. Once the user submits the form, we should validate the email and display an error message if the validation fails. If validation succeeds, we display a success message. Simple, hah?

I’d split this form into 3 React components:


We can use a nice perl one liner in the terminal to process files line by line. We can do many interesting things with it:

  • Count lines that match a regular expression
  • Add a line before or after the matched line
  • Remove or keep only the lines that match our search
  • and more
elephant
lion
bear
perl -p -e '$_ = qq(Lion King\n) if /lion/'…


Before diving into advanced command line usage examples, I’d like to explain another basic concept — piping. Piping is the inter-process communication mechanism that allows to send the output of one program to another program. To pipe programs together in a shell, we use the vertical bar character |. The general syntax is:

command one | command two [| command three …]

The shell creates a process for each program and arranges the necessary connections between their standard streams. …


Let’s start with the basics. What do the standard streams do?

A program running in a Unix-like operating system can read and write from/to one of the 3 standard streams:

  • stdout (Standard Output) is used by a program to write its output data. The common output destination is the text terminal which started the program.
  • stderr (Standard Error) is where a program writes its error messages.

Dmytro Danylov

Hi! I’m a JavaScript developer. I like programming, building web apps, and sharing my knowledge.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store