Express with TypeScript's Starter.
ð¤ What is Express ?
Express is a fast, open and concise web framework and is a Node.js based project.
ð Introducing the package.
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
ð Quick Start
Install with the npm global package
$ npm install -g typescript-express-starter
Run npx to install the package
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.
Select a templates
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
â â âââ 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
â
âââ .env
âââ .gitignore
âââ jest.config.js
âââ package-lock.json
âââ package.json
âââ swagger.yaml
âââ tsconfig.json
âââ tslint.json
ð Swagger UI Docs
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
REST Client allows you to send HTTP request and view the response in Visual Studio Code directly.
VSCode Extension REST Client Install.
ð¬ Recommended Commit Message
When | Commit Message |
---|---|
Add function | feat: |
Fix bug | fix: |
Refactoring | refactor: |
Add package | package: |
Fix readme | docs: |
Improvements style | style: |
ð³ License
ð¤? Contributors
-
Jeongwon Kim https://github.com/swtpumpkin
-
Lloyd Park https://github.com/yeondam88
-
BitYoungjae https://github.com/BitYoungjae
-
strama4 https://github.com/strama4
-
João Silva https://github.com/joaopms
-
sonbyungjun https://github.com/sonbyungjun
-
Sean Maxwell https://github.com/seanpmaxwell
-
Paolo Tagliani https://github.com/pablosproject
ð¬ Please request an issue
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.