Code Monkey home page Code Monkey logo

node-ts-template's Introduction

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.

node-ts-template's People

Contributors

felipewom avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.