Skip to content

ilCollez/typescript-template

Repository files navigation

Simple TypeScript Template

This template is based on my personal experience with Node.js and TypeScript. It provides a simple but complete setup for a general purpose TypeScript app.

This template includes

This template also includes the dotenv package. Just create a .env file in the root of your project and add your environment variables, they will be automatically loaded when running npm run dev. NOTE: dotenv is installed as a dev dependency, as it is not recommended to use it in production

Scripts

  • npm start: Starts the application
  • npm run dev: Starts Nodemon with ts-node
  • npm run build: Builds the project for production
  • npm test: Runs the unit tests with Jest
  • npm run lint: Runs ESLint for code linting
  • npm run lint:fix: Runs ESLint for code linting and automatically fixes the issues
  • npm run format: Runs Prettier for code formatting

Use this template

First of all, you need to clone this repository.

# Make sure to replace <project-name> with the name of the target folder

# With git
git clone https://github.com/ilCollez/typescript-template.git <project-name>

# With gh (Github CLI)
gh repo clone ilCollez/typescript-template <project-name>

Then, install the dependencies witn npm install

You are ready to start coding! Run npm run dev and edit the src/main.ts file :)

About

Simple TypeScript template based on my personal experience with Node.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •