NodeJs, TypeScript, Express and Sentry Starter Project
- Node 14+
- Express
- Sentry
- Node Config
- NotEnv
- Yarn
- Docker
- Docker-Compose
- Eslint
- Unit-Tests
- Docker
- Docker-Compose
- NPM
- Yarn
Copy and Paste .env-template to .env and edit the configurations
NODE_ENV=local | development | production
SENTRY_DSN=
Just run the command
make build
Just run the command
make run/docker-compose
make run/docker
make run
Just run the command
make lint
Just run the command
make test
- 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"
}
]
}
-
GET http://localhost:3000/sucess Returns 200
-
GET http://localhost:3000/error Returns 500 and if Sentry is active, sends errors to Sentry Console.
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
Just don't commit directly on master, push a branch and Pull Request.