Skip to content

Files

Latest commit

Aug 3, 2024
cb031c4 · Aug 3, 2024

History

History
48 lines (36 loc) · 771 Bytes

README.md

File metadata and controls

48 lines (36 loc) · 771 Bytes

node-ts-devcontainer

Init project

Reconfigure the project for your needs.

rm package.json yarn.lock tsconfig.json biome.json

# Init project
yarn init
yarn add -D typescript nodemon ts-node @types/node
yarn run tsc --init

# Add biome(formatter, linter)
yarn add -D @biomejs/biome
yarn run biome init

# Add nodemon(dev server)
yarn add -D nodemon

Add scripts

"scripts": {
    "build": "tsc",
    "lint": "biome lint",
    "lint:fix": "biome lint --write",
    "format": "biome format",
    "format:fix": "biome format --write",
}

Run sample

Add scripts to package.json:

"scripts": {
    "dev": "nodemon --watch 'src/**/*.ts' --exec 'ts-node' src/index.ts",
}
yarn add express @types/express
yarn dev