https://github.com/anwarhossainsr/node-express-template
A Node.js Express Template for rapid web app development. Features include Express.js, modular architecture, pre-configured middleware, environment setup, centralized error handling, and sample routes/controllers. Perfect for RESTful APIs or web apps. Fork and customize!
https://github.com/anwarhossainsr/node-express-template
api backend-api boilerplate eslint express express-node-template expressjs mongodb node-express nodejs project-structure project-template rest-api swagger swagger-ui-express template typescript
Last synced: 11 months ago
JSON representation
A Node.js Express Template for rapid web app development. Features include Express.js, modular architecture, pre-configured middleware, environment setup, centralized error handling, and sample routes/controllers. Perfect for RESTful APIs or web apps. Fork and customize!
- Host: GitHub
- URL: https://github.com/anwarhossainsr/node-express-template
- Owner: AnwarHossainSR
- License: mit
- Created: 2023-08-27T06:35:13.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-19T17:20:17.000Z (over 1 year ago)
- Last Synced: 2025-01-25T09:41:55.702Z (about 1 year ago)
- Topics: api, backend-api, boilerplate, eslint, express, express-node-template, expressjs, mongodb, node-express, nodejs, project-structure, project-template, rest-api, swagger, swagger-ui-express, template, typescript
- Language: TypeScript
- Homepage:
- Size: 987 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Table of Contents
## About The Project
# Express API Boilerplate
This project is a boilerplate for creating RESTful APIs using **Node.js**, **Express**, and **TypeScript**. It is designed to help you quickly set up a solid foundation for your API development, with a focus on best practices and maintainability.
### Built With
This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
## Features
- **Express 4.18.2**: A fast, unopinionated, minimalist web framework for Node.js.
- **TypeScript 5.2.2**: Strongly typed JavaScript that compiles to plain JavaScript.
- **Yarn 1.22.0**: Fast, reliable, and secure dependency management.
- **ESLint 8.48.0** & **Prettier 3.0.3**: Code quality tools for maintaining a consistent codebase.
- **JWT 9.0.2**: Secure authentication and authorization with JSON Web Tokens.
- **Joi 17.10.0**: Schema validation for API request bodies.
- **Swagger UI Express 5.0.0**: Auto-generated API documentation.
- **Mongoose 7.5.0**: Elegant MongoDB object modeling for Node.js.
## Setup
1. **Clone the repository**:
```bash
git clone https://github.com/yourusername/express-api-boilerplate.git
cd express-api-boilerplate
```
2. **Install dependencies**:
```bash
yarn install
```
3. **Environment setup**:
- Create a `.env` file based on the `.env.example` template.
4. **Running the application**:
- **Development**:
```bash
yarn dev
```
- **Production**:
```bash
yarn start
```
5. **Linting and formatting**:
```bash
yarn eslint
yarn prettier
```
6. **Testing**:
- *(Include testing instructions if applicable)*
## Scripts
- `yarn dev`: Starts the development server with TypeScript watch mode.
- `yarn build`: Compiles TypeScript to JavaScript.
- `yarn start`: Runs the compiled application.
- `yarn eslint`: Lints the codebase using ESLint.
- `yarn prettier`: Formats the codebase using Prettier.
## Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## License
Distributed under the MIT License. See `LICENSE.txt` for more information.