


This package contains type definitions for Express.In this case we're installing the 7.32 version instead of the latest (8.1.0) because is the latest compatible version for Airbnb style guide, which is the one that I prefer.

Due to the fact that JavaScript is a loosely-typed language there is more probability we introduce errors. ESLint: Is a utility who helps us to find and fix errors in our code.Express: A Node.js framework, is going to be the main tool to build our API.Typescript: This one allow us to use typescript in our project.# -S shorcut for -save, -D shorcut for -save-dev Npm i -D typescript prettier husky ts-node tsconfig-paths eslint-config-prettier lint-staged eslint-plugin-prettier eslint-import-resolver-typescript nodemon Once we have our package.json, we'll install the following dependencies: npm i -S express # -y automatically answers yes to any prompts that npm might print in the console Then, we'll initialize a new project with a package.json: npm init -y Project setupįirst of all we're going to create a folder called my-project (you can choose the name you like), and move into it. Here we'll see how to setup a node API using express along with typescript including ESLint and Prettier to enforce code style, Husky and lint-staged to review our commits in addition to Mocha and Chai to write tests. Besides that, a well built project from the beginning is easier to understand, maintain, and will help you avoid a lot of problems in the future. But most importantly, it's a good way to get experience in order to grow as a developer. Starting a project from scratch is a very interesting experience, it's something that you will certainly do at some point in time and it’s worth it to start digging into it by yourself because you don't know whether if the next project is already started or if you'll have to work alone.
