Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sm-haris/express-mongo-app
This Express Mongoose REST backend app starter template provides a robust foundation for building efficient Node.js applications. It includes user authentication, database integration, authentication middlewares, JWT tokens, logging, and Bcrypt hashing. This template streamlines development and offers a starting point for creating REST APIs
https://github.com/sm-haris/express-mongo-app
authentication authorization express jwt logging mongodb mongoose nodejs rest-api
Last synced: 17 days ago
JSON representation
This Express Mongoose REST backend app starter template provides a robust foundation for building efficient Node.js applications. It includes user authentication, database integration, authentication middlewares, JWT tokens, logging, and Bcrypt hashing. This template streamlines development and offers a starting point for creating REST APIs
- Host: GitHub
- URL: https://github.com/sm-haris/express-mongo-app
- Owner: SM-Haris
- Created: 2024-09-02T19:18:16.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-07T15:23:01.000Z (2 months ago)
- Last Synced: 2024-10-09T14:25:37.227Z (about 1 month ago)
- Topics: authentication, authorization, express, jwt, logging, mongodb, mongoose, nodejs, rest-api
- Language: TypeScript
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Express Mongoose REST Backend App Starter Template
## Introduction
This repository provides a well-structured Express Mongoose REST backend app starter template. It offers a strong foundation for building scalable and efficient Node.js applications with the following features:## Features
* **User Signup, Login, and Authentication:** Implements secure user registration, login, and authentication mechanisms using JWT tokens.
* **Mongoose Database Integration:** Leverages Mongoose for efficient data management with MongoDB, providing an object-oriented approach.
* **Complete Backend Architecture:** Adheres to best practices including clean code organization, modularity, and separation of concerns.
* **Authentication Middlewares:** Enforces authentication and authorization rules throughout the application using custom middleware functions.
* **JWT Token-Based Authentication:** Employs JWT tokens for secure session management and user verification.
* **File-Based Logging with Rotation:** Implements file-based logging with daily rotation for easy monitoring and analysis.
* **Bcrypt Hashing:** Uses Bcrypt for secure password hashing, protecting user credentials.
* **Advanced Security Policy:** Uses Helmet to ensure secure HTTP policy in security headers.## Getting Started
### Prerequisites
* **Node.js:** Version 18 or later
* **npm:** Version 8 or later
* **Git:** For cloning the repository
* **A supported database:** Ensure you have a compatible Mongo database system installed and configured### Clone the Repository
```Bash
git clone https://github.com/SM-Haris/express-mongo-app.git
```
Use code with caution.### Install Dependencies
```Bash
cd express-mongo-app
npm install
```
Use code with caution.### Environment Variables:
Create a .env file (not included in Git) and populate it with the necessary environment variables, such as database connection details, JWT secret, and other application-specific settings.Example .env file is provided in the repository
### Run the Application
```Bash
npm start
```
Use code with caution.### Run the Application in Development mode:
```Bash
npm run dev
```
Use code with caution.## Usage
The application's API endpoints can be accessed using your preferred HTTP client or API testing tool. Refer to your code for specific routes and functionalities.## Contributing
We encourage your contributions to improve this project. Please follow the standard Git workflow for pull requests.## Disclaimer
Use this template as a starting point for your own projects. While we strive to provide a robust foundation, security considerations and additional functionalities might be necessary for your specific application requirements.