Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aquie00tt/express-typescript-starter-kit
Express & TypeScript Starter Kit with MongoDB
https://github.com/aquie00tt/express-typescript-starter-kit
api error-handling eslint express express-starter-kit express-typescript-starter express-typescript-starter-kit mongodb nodemon nodemon-express prettier restful-api starter-kit ts-node typescript
Last synced: about 1 month ago
JSON representation
Express & TypeScript Starter Kit with MongoDB
- Host: GitHub
- URL: https://github.com/aquie00tt/express-typescript-starter-kit
- Owner: aquie00tt
- License: mit
- Created: 2024-10-12T21:07:35.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-28T06:57:27.000Z (about 2 months ago)
- Last Synced: 2024-10-28T21:12:14.636Z (about 2 months ago)
- Topics: api, error-handling, eslint, express, express-starter-kit, express-typescript-starter, express-typescript-starter-kit, mongodb, nodemon, nodemon-express, prettier, restful-api, starter-kit, ts-node, typescript
- Language: TypeScript
- Homepage:
- Size: 573 KB
- Stars: 10
- Watchers: 9
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
- Support: .github/SUPPORT.md
Awesome Lists containing this project
README
# Express & TypeScript Starter Kit
This is a starter kit for building APIs with **Express** and **TypeScript**. It includes a basic setup with **MongoDB** for data storage, along with commonly used middlewares, error handling, and structured project architecture.
## Features
- **TypeScript** support for improved development experience
- **Express** for building web applications and APIs
- **MongoDB** for data storage
- **CORS** support for cross-origin requests
- **Helmet** for securing HTTP headers
- **Morgan** for logging HTTP requests
- **Error handling** with custom error classes
- **Docker** support for containerized application deployment## Prerequisites
- Node.js 22
- MongoDB (installed locally or use a cloud service)## Installation
1. Clone the repository:
```bash
git clone https://github.com/yourusername/express-typescript-starter.git
```2. Navigate to the project directory:
```bash
cd express-typescript-starter
```3. Install the dependencies:
```bash
npm install
```4. Create a .env file by copying the .env.sample:
```bash
cp .env.sample .env.(production | development | test)
```5. Update the .env file with your configuration settings.
## Usage
To start the server, run:
```bash
npm run start
```For development mode with auto-reloading, run:
```bash
npm run dev
```## Running Tests
To run the tests, use:
```bash
npm test
```# Contributing
1. Fork the repository.
2. Create a new branch (git checkout -b feature-branch).
3. Make your changes and commit them (git commit -m 'Add new feature').
4. Push to the branch (git push origin feature-branch).
5. Open a pull request.