1.0.0 • Published 6 months ago
@nish34/express-mongoose-starter v1.0.0
Express Mongoose Starter
A professional Express.js starter package with Mongoose integration and JWT authentication.
Installation
npm install express-mongoose-starterUsage
const { createApp } = require('express-mongoose-starter');
// Initialize the app with custom configuration
const app = createApp({
mongoUri: 'mongodb://localhost:27017/your-database',
port: 3000
});
// The app is already listening on the specified portFeatures
- Express.js setup with best practices
- MongoDB integration with Mongoose
- JWT authentication
- Error handling middleware
- Logging with Winston
- Security with Helmet
- CORS enabled
- API routing structure
- TypeScript support
Configuration Options
| Option | Type | Description |
|---|---|---|
| mongoUri | string | MongoDB connection URI |
| port | number | Port to run the server on |
| logger | object | Custom Winston logger instance |
License
MIT
1.0.0
6 months ago