/nodejs-typescript-express-starter

NodeJs, TypeScript, Express and Sentry Starter Project

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

nodejs-typescript-express-starter

NodeJs, TypeScript, Express and Sentry Starter Project

Application Checklist

  • Node 14+
  • Express
  • Sentry
  • Node Config
  • NotEnv
  • Yarn
  • Docker
  • Docker-Compose
  • Eslint
  • Unit-Tests

Before Run

Required installed tools:

  • Docker
  • Docker-Compose
  • NPM
  • Yarn

Create .env file

Copy and Paste .env-template to .env and edit the configurations

NODE_ENV=local | development | production
SENTRY_DSN=

How To Build

Just run the command

make build

How To Run

Docker-Compose

Just run the command

make run/docker-compose

Docker

make run/docker

Local

make run

Lint

Just run the command

make lint

Unit Tests

Just run the command

make test

Run de project inside VSCode

  • 1: create .vscode folder in root project
  • 2: add the file launch.json in the folder
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "APP",
      "type": "node",
      "request": "launch",
      "runtimeArgs": ["-r", "ts-node/register"],
      "runtimeExecutable": "node",
      "args": ["--inspect", "${workspaceFolder}/src/index.ts"],
      "cwd": "${workspaceRoot}",
      "skipFiles": ["<node_internals>/**", "node_modules/**"],
      "envFile": "${workspaceFolder}/.env"
    }
  ]
}

Endpoints

Sentry

To learn more about Sentry, visit https://sentry.io Create a free Sentry account and project Add the SENTRY_DSN in .env file

SENTRY_DSN=YOUR-SENTRY-DSN

Contributors

Just don't commit directly on master, push a branch and Pull Request.