Skip to content

felipewom/node-ts-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Node.js TypeScript Project Template

GitHub License Buy Me A Coffee

Overview

This is a template for kickstart Node.js TypeScript projects with best practices in mind.

It includes configurations for ESLint, Prettier, Jest, and Zod to ensure code quality, consistency, and maintainability.


Features

  • ✨ Node.js + TypeScript: Build robust applications with TypeScript in a Node.js environment.
  • 🧹 ESLint and Prettier: Enforce code quality and formatting standards.
  • 🚦 Jest: Testing framework for unit and integration tests.
  • πŸ”’ Zod: Enforce strong typing and validate data structures.

Getting Started

Follow these steps to use the template:

1. Clone the Repository:

git clone https://github.com/felipewom/node-ts-template.git your-project-name

2. Install Dependencies:

cd your-project-name
npm install

3. Run in Development Mode:

npm run dev

This will run the application in development mode with ts-node-dev and hot reloading.

npm run debug

You can also run the application in debug mode with ts-node-dev and hot reloading.

4. Lint Code:

npm run lint

5. Run Tests:

npm test

This will run all tests with jest unit-tests and e2e-tests.

You can also run tests separately:

npm run test:unit

This will run unit-tests with jest.

npm run test:e2e

This will run e2e-tests with jest.

6. Build for Production:

npm run build

This will build the application for production with tsc.

7. Run in Production Mode:

npm start

This will run the application in production mode with node.

Project Structure

  • πŸ“ src: Application source code.
  • πŸ“ tests: Test files.
  • πŸ“ templates: Template files for project generation (if applicable).
  • πŸ“„ .eslintrc.js: ESLint configuration.
  • πŸ“„ .prettierrc.js: Prettier configuration.
  • πŸ“„ jest.config.js: Jest configuration.
  • πŸ“„ tsconfig.json: TypeScript configuration.

Contributing

Contributions are welcome! Follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/your-feature.
  3. Make your changes.
  4. Commit your changes: git commit -m 'Add new feature'.
  5. Push to the branch: git push origin feature/your-feature.
  6. Open a pull request.

License

This project is licensed under the MIT License.

About

πŸš€ Node.js TypeScript Template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published