Coder Social home page Coder Social logo

yeri-kim / typescript-express-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ljlm0402/typescript-express-starter

1.0 0.0 0.0 174 KB

๐Ÿš€ TypeScript Express Starter

Home Page: https://www.npmjs.com/package/typescript-express-starter

License: MIT License

JavaScript 16.30% TypeScript 83.70%

typescript-express-starter's Introduction

logo

Express with TypeScript's application generator.

NPM Version Package License NPM Downloads


๐Ÿง What is it?

Creates a new typescript express application. application is configured to use TypeScript instead of plain JavaScript.

๐Ÿค” Why typescript-express-starter?

Node Js is great for the rapid development of web-projects, but is often neglected because of the lack of type safety. TypeScript solves this issue and (along with its linter file) can even make your code more robust than some other static languages like Java.

โš™๏ธ Installation

$ npm install -g typescript-express-starter

๐Ÿš€ Quick Start

The quickest way to get started is use npx and pass in the name of the project you want to create. If you don't specify a project name, the default typescript-express-starter will be used instead.

1. Create the app

$ npx typescript-express-starter "project name"

Choose the template you want. We will create more templates later.

2. Select a templates

? Select a templates (Use arrow keys)
> default
  mongoose
--------------------

Start your typescript-express-starter app in development mode at http://localhost:3000/

$ cd "project name" && npm run start

๐ŸŽ  Available commands for the server.

  • Run the Server in production mode : npm run start.
  • Run the Server in development mode : npm run dev.
  • Run all unit-tests: npm run test.
  • Check for linting errors: npm run lint.

โ›‘ Code Structure (default)

โ”‚
โ”œโ”€โ”€ /src
โ”‚   โ”œโ”€โ”€ /controllers
โ”‚   โ”‚   โ”œโ”€โ”€ index.controller.ts
โ”‚   โ”‚   โ””โ”€โ”€ users.controller.ts
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ /dtos
โ”‚   โ”‚   โ””โ”€โ”€ user.dto.ts
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ /exceptions
โ”‚   โ”‚   โ””โ”€โ”€ HttpException.ts
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ /interfaces
โ”‚   โ”‚   โ”œโ”€โ”€ routes.interface.ts
โ”‚   โ”‚   โ””โ”€โ”€ user.interface.ts
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ /middlewares
โ”‚   โ”‚   โ”œโ”€โ”€ error.middleware.ts
โ”‚   โ”‚   โ””โ”€โ”€ validation.middleware.ts
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ /models
โ”‚   โ”‚   โ””โ”€โ”€ users.model.ts
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ /routes
โ”‚   โ”‚   โ”œโ”€โ”€ index.route.ts
โ”‚   โ”‚   โ””โ”€โ”€ users.route.ts
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ /services
โ”‚   โ”‚   โ””โ”€โ”€ user.service.ts
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ /tests
โ”‚   โ”‚   โ”œโ”€โ”€ index.test.ts
โ”‚   โ”‚   โ””โ”€โ”€ users.test.ts
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ /utils
โ”‚   โ”‚   โ”œโ”€โ”€ util.ts
โ”‚   โ”‚   โ””โ”€โ”€ vaildateEnv.ts
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ app.ts
โ”‚   โ””โ”€โ”€ server.ts
โ”‚
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ jest.config.js
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ tslint.json

License

MIT

Contributors

typescript-express-starter's People

Contributors

ljlm0402 avatar swtpumpkin avatar yeondam88 avatar

Stargazers

Yunseok Oh 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.