Git Product home page Git Product logo

template-ts-node's Introduction

Node Template

Hey guys! This is a template I made to start up any TS project with node! Just be sure you have ESLint, Prettier, and editorconfig set on your VS Code โ™ฅ๏ธ

This template uses Express, so I hope this is not an issue for ya. ๐Ÿ˜œ

I'm using 3333 as the port. Who cares, right?
Just run yarn dev:server and have the ts-node-dev server the same way nodemon does and without tsc all the time. That's a pain in the ass.

Yarn

I'm using Yarn here because I do like it more than NPM. If you enjoy wasting time and REALLY would much rather use NPM than Yarn, remove the yarn.lock, npm i on it and go for it, baby!

ESLint

I'm using ESLint on this project. This project uses:

  • Airbnb style guide
  • Typescript
  • Javascript Modules
  • Ignores the extension on importing TS files

Just remember to add this line to correct all the errors on the file on saving ๐Ÿ˜‰

"editor.codeActionsOnSave": {
  "source.fixAll.eslint": true
},

Prettier

Since I'm using the Airbnb style guide, prettier is quite simple here. Just single quotes and trailing commas. The parenthesis around arrow functions is a personal thing ;D

editorconfig

You know. If you work in a bigger team, that's necessary. So the twist is:

  • trimming white space
  • inserting a final newline
  • end of the line is an LF, just to have a default value for all OS

launch.json

This is here for debugging purposes. But it's pretty simple and unnecessary if you like to console.log all over the place. I'll not judge you; I already was one of you guys ๐Ÿ˜‰

TS

I'm using typescript (sorry about that). I feel this is cool. Judge me. But it's already set to create builds on ./dist and have the root folder on ./src. You are welcome ๐Ÿ˜Œ

And that's it! Enjoy fellas!!

template-ts-node's People

Contributors

brunoborta avatar

Watchers

James Cloos avatar  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.