Express with TypeScript's Starter.
Express is a fast, open and concise web framework and is a Node.js based project.
Express consists of JavaScript, which makes it vulnerable to type definitions.
That's why we avoid supersets with starter packages that introduce TypeScript.
The package is configured to use TypeScript instead of JavaScript.
NOTE: This project is a variation of express-generator-typescript by seanpmaxwell 👍
$ npm install -g typescript-express-starter
npx is a tool in the JavaScript package management module, npm.
This is a tool that allows you to run the npm package on a single run without installing the package.
If you do not enter a project name, it defaults to typescript-express-starter.
$ npx typescript-express-starter "project name"
Choose the template you want. We will create more templates later.
Start your typescript-express-starter app in development mode at http://localhost:3000/
$ cd "project name" && npm run start
- 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
. - Fix for linting:
npm run lint:fix
.
│
├── /src
│ ├── /controllers
│ │ ├── auth.controller.ts
│ │ ├── index.controller.ts
│ │ └── users.controller.ts
│ │
│ ├── /dtos
│ │ └── users.dto.ts
│ │
│ ├── /exceptions
│ │ └── HttpException.ts
│ │
│ ├── /http
│ │ ├── auth.http
│ │ └── users.http
│ │
│ ├── /interfaces
│ │ ├── auth.interface.ts
│ │ ├── routes.interface.ts
│ │ └── users.interface.ts
│ │
│ ├── /middlewares
│ │ ├── auth.middleware.ts
│ │ ├── error.middleware.ts
│ │ └── validation.middleware.ts
│ │
│ ├── /models
│ │ └── users.model.ts
│ │
│ ├── /routes
│ │ ├── auth.route.ts
│ │ ├── index.route.ts
│ │ └── users.route.ts
│ │
│ ├── /services
│ │ ├── auth.service.ts
│ │ └── users.service.ts
│ │
│ ├── /tests
│ │ ├── auth.test.ts
│ │ ├── index.test.ts
│ │ └── users.test.ts
│ │
│ ├── /utils
│ │ ├── util.ts
│ │ └── vaildateEnv.ts
│ │
│ ├── app.ts
│ └── server.ts
│
├── .dockerignore
├── .editorconfig
├── .env
├── .eslintignore
├── .eslintrc
├── .gitignore
├── .prettierrc
├── docker-compose.yml
├── Dockerfile
├── Dockerfile.dev
├── jest.config.js
├── Makefile
├── nginx.conf
├── package-lock.json
├── package.json
├── swagger.yaml
└── tsconfig.json
Docker is a platform for developers and sysadmins to build, run, and share applications with containers.
Docker Install.
- starts the containers in the background and leaves them running :
docker-compose up -d
. - Stops containers and removes containers, networks, volumes, and images :
docker-compose down
.
Palantir, the backers behind TSLint announced in 2019 that they would be deprecating TSLint in favor of supporting typescript-eslint in order to benefit the community.
So, migration from TSLint to ESLint.
ESLint, Find and fix problems in your JavaScript code
Prettier is an opinionated code formatter.
It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.
VSCode Extension Prettier, ESLint
Simplify API development for users, teams, and enterprises with the Swagger open source and professional toolset.
Find out how Swagger can help you design and document your APIs at scale.
Start your typescript-express-starter app in development mode at http://localhost:3000/swagger
Modify swagger.yaml
file to your source code
REST Client allows you to send HTTP request and view the response in Visual Studio Code directly.
VSCode Extension REST Client Install.
When | Commit Message |
---|---|
Add Feature | ⚡️ Add Feature |
Fix Bug | 🐞 Fix Bug |
Refactoring Code | 🛠 Refactoring Code |
Install Package | 📦 Install Package |
Fix Readme | 📚 Fix Readme |
Update Version | 🌼 Update Version |
New Releases | 🎉 New Releases |
-
Jeongwon Kim https://github.com/swtpumpkin
-
João Silva https://github.com/joaopms
-
BitYoungjae https://github.com/BitYoungjae
-
Paolo Tagliani https://github.com/pablosproject
-
Lloyd Park https://github.com/yeondam88
-
strama4 https://github.com/strama4
-
sonbyungjun https://github.com/sonbyungjun
-
Sean Maxwell https://github.com/seanpmaxwell
-
Ed Guy https://github.com/edguy3
-
Malavan https://github.com/malavancs
In the future, please write down your desired template, questions, and features to be added, and we will try our best to answer and reflect them.
Thank you very much for your interest in our package.