Skip to content

πŸš€ No more wasting your time writing an ignition codes for Express using TypeScript.

License

Notifications You must be signed in to change notification settings

techbless/typescript-express-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

logo

Build Status Dependency Status devDependency Status

No more wasting your time writing an ignition codes for Express using TypeScript.

Get Ready to Fly on

TypeScript + Express + Sequelize + Passport

Requirement

Requirement Reason
mysql Mysql Server is required for Sequelize

Npm / Yarn Scripts

Npm Script Description
start Runs node on dist/server.js which is the apps entry point. before this, you should build
start:dev Runs node on src/server.ts with ts-node for development environment. watching your codes change
prebuild Copys asset files in src/views and src/public to dist directory before tsc
build Runs all build tasks, compile TypeScript codes after copying asset files in views, public
test Runs tests using Mocha and Chai
lint Runs ESLint on project files
lint:fix Runs ESLint on project files and fix codes

Project Structure

  • This is not valid at this time. will be updated.
typescript-express-starter
β”œβ”€ .env
β”œβ”€ dist
β”‚   └─ [ build files ]
└─ src
      β”œβ”€ app.ts ← instantiate app
      β”œβ”€ server.ts ← entry point which starts server
      β”œβ”€ @types
      |  └─ express.d.ts ← override req.User types for passport.js
      β”œβ”€ config
      |  β”œβ”€ passport.ts ← config for passport.js
      |  └─ sequelize.ts ← config for sequelize.js
      β”œβ”€ controllers
      |   β”œβ”€ user.ts ← controller for accounts
      |   β”œβ”€ echo.ts ← controller for echo test, recommend to delete
      |   └─ sample.ts ← sample template controller
      β”œβ”€ middlewares
      |   β”œβ”€ error_handler.ts ← middlewares handling all errors.
      β”œβ”€ models
      β”‚   β”œβ”€ index.ts ← export sequelize instance
      |   β”œβ”€ sequelize.ts ← instantiate sequelize.ts
      |   β”œβ”€ user.ts ← User model
      |   └─ sample.ts ← sample template model
      β”œβ”€ public
      β”‚   └─ common.css ← static file which can be accessed with '/common.css'
      β”œβ”€ routes
      |   β”œβ”€ user.ts ← router for accounts
      |   β”œβ”€ echo.ts ← router for echo test
      |   β”œβ”€ sample.ts ← sample template router
      |   └─ async.wrapper.ts ← wrapper for async controller function.
      └─ test
          └─ starter.spec.ts ← initial test cases

License

MIT

About

πŸš€ No more wasting your time writing an ignition codes for Express using TypeScript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published