@adonisote.dev/express-typescript-starter
v1.0.0
Published
A starter template for building TypeScript Express backends
Readme
Express TypeScript Starter
A starter template for building robust TypeScript Express backends.
Features
- TypeScript backend using Express
- Modern dev workflow with tsx
- Linting with ESLint and formatting with Prettier
- Pre-commit and pre-push hooks powered by Husky and lint-staged
- Ready for VSCode with recommended extensions and workspace settings
Getting Started
Prerequisites
Installation
Clone the repo:
git clone https://github.com/adonisote/express-typescript-starter.git cd express-typescript-starterInstall dependencies:
npm install(Optional) Enable Husky hooks:
npm run prepare
Development
Run in development mode
npm run dev- Starts the server with hot-reloading via
tsx.
Build for production
npm run build- Compiles TypeScript to the
distdirectory.
Start in production
npm start- Runs the compiled JavaScript from
dist.
Code Quality
Lint
npm run lintLint & auto-fix
npm run lint:fixFormat check
npm run formatFormat & auto-fix
npm run format:fixTesting
Note: Tests are not yet implemented.
Placeholder command:
npm testHusky Git Hooks
- pre-commit: Runs lint-staged (ESLint + Prettier on staged files)
- pre-push: Runs tests before pushing (aborts on failure)
- post-commit/post-push: Friendly notifications
VSCode
Recommended extensions are in .vscode/extensions.json:
Workspace settings are in .vscode/settings.json.
Project Structure
├── src/ # Source code
│ └── index.ts # Entry point
├── dist/ # Compiled output (ignored)
├── .husky/ # Git hooks
├── .vscode/ # VSCode settings
├── package.json
├── tsconfig.json
├── eslint.config.js
├── .prettierrc
├── .prettierignore
├── .gitignore
└── README.mdContributing
- Open an issue describing your idea or bug.
- Create a feature/fix branch:
git checkout -b issue-<number>-<short-description> - Commit your changes with descriptive messages.
- Push and open a Pull Request referencing the issue (
Closes #<number>). - Wait for review and merge!
License
ISC
Happy coding!
