An open API service indexing awesome lists of open source software.

https://github.com/isur/ts-start


https://github.com/isur/ts-start

Last synced: 2 months ago
JSON representation

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.