Skip to content
forked from git-dariel/Mongo

A robust and scalable MongoDB template using Express.js and TypeScript, designed for building modern web applications.

License

Notifications You must be signed in to change notification settings

retsaeiouu/Mongo

 
 

Repository files navigation

MONGO

A robust and scalable MongoDB template using Express.js and TypeScript, designed for building modern web applications.

📋 Prerequisites

  • Node.js (v14 or higher)
  • MongoDB (v4.4 or higher)
  • TypeScript (v4.5 or higher)
  • npm or yarn

🚀 Quick Start

  1. Clone the repository:
git clone https://github.com/git-dariel/Mongo.git
cd Mongo
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/your-database
NODE_ENV=development
  1. Start the development server:
npm run dev

🛠️ Scripts

  • npm run dev: Start development server with hot-reload
  • npm run build: Build for production
  • npm start: Start production server
  • npm run lint: Run ESLint
  • npm test: Run tests

📁 Project Structure

├── config/        # Configuration files
├── helpers/       # Helpers files
├── controllers/   # Route controllers
├── middlewares/   # Custom middlewares
├── models/        # MongoDB models
├── repositories/  # Database operations
├── routes/        # API routes
├── services/      # Business logic
└── index.ts       # Express app initialization

🔒 Environment Variables

Variable Description Default
PORT Server port 5000
MONGODB_URI MongoDB connection URL -
NODE_ENV Environment development

🔗 API Endpoints

Document your API endpoints here. Example:

GET    /api/v1/resource
POST   /api/v1/resource
PUT    /api/v1/resource/:id
DELETE /api/v1/resource/:id

💻 Technology Stack

  • Express.js
  • TypeScript
  • MongoDB & Mongoose
  • ESLint & Prettier
  • Winston (Logging)
  • Helmet (Security)

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

👤 Author

Dariel Avila

🙏 Acknowledgments

  • Express.js documentation
  • MongoDB documentation
  • TypeScript documentation

About

A robust and scalable MongoDB template using Express.js and TypeScript, designed for building modern web applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%