https://github.com/isur/ts-start
https://github.com/isur/ts-start
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/isur/ts-start
- Owner: Isur
- Created: 2023-08-06T15:59:17.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-22T20:07:32.000Z (about 2 years ago)
- Last Synced: 2025-01-13T11:17:20.958Z (over 1 year ago)
- Language: JavaScript
- Size: 329 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# TS-Starter
Typescript starter with:
- jest
- eslint
- prettier
- Dockerfile
- pnpm
# Config
Setup Environment variables in `.env` file.
Example config is in `.env-template` file.
| ENV | Definition |
| ---- | ---------------------------- |
| PORT | Port on which app is running |
| ENV | development or production |
# Scripts
| Script | Definition |
| ---------- | ----------------------------------- |
| dev | Run dev with hot reload |
| build | Build app |
| start | Run builded app |
| cli | Run builded app - cli |
| typecheck | Check types with tsc |
| test | Run jest tests with coverage report |
| test:watch | Run jest tests with watch mode |
| lint | Run eslint and prettier checks |
| lint:fix | Run eslint and prettier fix |
# Deploy
App is builded into `./dist` directory.
There is also `Dockerfile` and `docker-compose.yml` files.
Docker compose will spin app up, just remember about `.env` file.
# Dependencies
This starter is using `tsc` and `tsc-alias` for compiling app. To run hot reload development there is `nodemon` watching generated `.js` files, and `concurrently` to run together compiler and app.
For static code checking there is `eslint` with plugins and `prettier`.
Testing is done with `jest`.
Environment config is loaded with `dotenv` and `dotenv-expand`.
For schema validation `zod` is used.