https://github.com/rootz491/express-oop-boilerplate
https://github.com/rootz491/express-oop-boilerplate
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rootz491/express-oop-boilerplate
- Owner: rootz491
- License: mit
- Created: 2024-06-22T17:12:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-19T15:13:05.000Z (over 1 year ago)
- Last Synced: 2025-03-09T14:06:19.910Z (over 1 year ago)
- Language: TypeScript
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Express TypeScript Starter
This repository provides a basic setup for building an Express.js application using TypeScript. It includes:
- TypeScript configuration (`tsconfig.json`)
- Basic Express server setup (`app.ts`)
- Decorators for creating controllers and routes
- Example controller (`UserController`) demonstrating GET and POST routes
## Prerequisites
Before running this application, make sure you have the following installed:
- Node.js (v14.x or higher)
- npm (v6.x or higher) or yarn (v1.x or higher)
- TypeScript (v4.x or higher)
## Getting Started
1. **Clone the repository:**
```bash
git clone https://github.com/rootz491/express-oop-boilerplate
cd express-oop-boilerplate
```
2. **Install dependencies:**
```bash
npm install
```
3. **Compile TypeScript:**
```bash
npm run build
```
4. **Run the server:**
```bash
npm start
```
The server will start at http://localhost:3000.
## Project Structure
The project structure is organized as follows:
```
.
├── src/ # Source files
│ ├── controllers/ # Controllers defining route handlers
│ ├── decorators/ # Custom decorators (e.g., for routes)
│ ├── utils/ # Utility functions
│ ├── app.ts # Entry point for the application
│ └── ... # Other TypeScript files
├── dist/ # Compiled JavaScript files (generated after build)
├── node_modules/ # Dependencies installed by npm or yarn
├── package.json # Project manifest
├── tsconfig.json # TypeScript configuration
└── README.md # Project documentation
```
## Contributing
Contributions are welcome! Fork the repository and submit a pull request for any enhancements or fixes.
## License
This project is licensed under the MIT License. See the [LICENSE](https://mit-license.org/) for details.