Coder Social home page Coder Social logo

myfreax / typescript-backend-template Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 47 KB

Typescript+Docker+Eslint+Prettier+Jest+Husky+Commitlint+Ts-node+Vscode+ts-node-dev+CD/CI+codecov

License: Apache License 2.0

JavaScript 22.18% Shell 7.05% Dockerfile 11.36% TypeScript 59.42%
typescript docker eslint prettier commitlint husky jest vscode ts-node ts-node-dev cd ci github action codecov

typescript-backend-template's Introduction

typescript-backend-template

Typescript+Docker+Eslint+Prettier+Jest+Husky+Commitlint+Ts-node+Vscode+ts-node-dev+CD/CI

Badge

Every time you create a project, you have to configure various tools. This will be a waste of our time. We will do this with a template to solve this problem. Congratulations on finding the project template you want.

How use this template with your project?

click above Use this template button, create new fork to your github.Then git clone your local host. You can direct clone this repo to your local host

git clone your-github-repo
yarn install

Development Mode

It restarts target node process when any of required files changes

yarn start:dev

Test And E2E

yarn test
yarn test:e2e

Only run specify file

yarn ts src/main.ts

Typescript

What is TypeScript and why would I use it in place of JavaScript?

  • Support for modern JavaScript features
  • Advanced type system
  • Developer tooling support
  • Optionally static typing and type inference
  • Enhanced IDE support
  • Strict null checks
  • JavaScript interoperability

Eslint

ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code, with the goal of making code more consistent and avoiding bugs. ... ESLint uses an AST to evaluate patterns in code. ESLint is completely pluggable, every single rule is a plugin and you can add more at runtime.

Jest

Jest is a delightful JavaScript Testing Framework with a focus on simplicity.

Why code testing? Let us start with a few questions:

  • How to measure the quality of code
  • How to ensure the quality of code
  • Are you free to refactor code
  • How to guarantee the correctness of refactored code
  • Have you confidence to release your untested code
  • If you are not sure, you probably need unit testing.

Prettier

Prettier is an opinionated code formatter with support for:

  • JavaScript (including experimental features)
  • JSX
  • Angular
  • Vue
  • TypeScript
  • CSS, Less, and SCSS
  • HTML
  • JSON
  • GraphQL
  • Markdown, including GFM and MDX
  • YAML Why to use Prettier in your project?
  • How to ensure the code style in a team?
  • Why Prettier?

Husky

Having a good feedback loop is extremely important for developers. A properly configured project has a CI/CD pipeline that ensures the code will not break anything in the application’s logic or codebase itself by running the necessary checks, such as static code analysis and tests. Husky can help you do this.

Commitlint

commitlint helps your team adhering to a commit convention. By supporting npm-installed configurations it makes sharing of commit conventions easy.

Why Use Conventional Commits?

  • Automatically generating CHANGELOGs.
  • Automatically determining a semantic version bump (based on the types of commits landed).
  • Communicating the nature of changes to teammates, the public, and other stakeholders.
  • Triggering build and publish processes.
  • Making it easier for people to contribute to your projects, by allowing them to explore a more structured commit history.

Ts-node

ts-node is a TypeScript execution engine and REPL for Node.js.

It JIT transforms TypeScript into JavaScript, enabling you to directly execute TypeScript on Node.js without precompiling. This is accomplished by hooking node's module loading APIs, enabling it to be used seamlessly alongside other Node.js tools and libraries.

  • Automatic sourcemaps in stack traces
  • Automatic tsconfig.json parsing
  • Automatic defaults to match your node version
  • Typechecking (optional)
  • REPL
  • Write standalone scripts
  • Native ESM loader
  • Use third-party transpilers
  • Use custom transformers
  • Integrate with test runners, debuggers, and CLI tools
  • Compatible with pre-compilation for production

Vscode

We recommend install extensions

Docker

What can I use Docker for?

  • Fast, consistent delivery of your applications
  • Responsive deployment and scaling
  • Running more workloads on the same hardware

ts-node-dev

ts-node-dev Compiles your TS app and restarts when files are modified.

CD/CI

GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. Make code reviews, branch management, and issue triaging work the way you want.

typescript-backend-template's People

Contributors

myfreax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

1ethansempa

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.