An awesome CLI starter template to jumpstart your Express.js (JavaScript) projects, helping you to speed up the process of building RESTful APIs.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Within this repository, you will discover a fully configured and ready-to-use Express.js web application designed for the Node.js runtime. The project is built using TypeScript, providing a robust foundation for developing web applications effortlessly.
Here's why:
-
Linting & Formatting:
- ✔️ ESLint for code linting
- 🎨 Prettier for code formatting
-
Deployment:
- 🌐 Ready for deployment on Vercel
- 🚀 One-click deployment
-
Development Workflow:
- 🔧 Configured for TypeScript
- 🔄 Live reload for efficient development
- 🛠 Optimized code for production
-
Security Measures Added:
- 🔐 Helmet for setting up security headers
- 🔒 XSS protection with xss-clean middleware
- 🚧 HTTP Parameter Pollution (HPP) protection
- 🧼 MongoDB data sanitization with express-mongo-sanitize
- 🚦 Rate limiting with express-rate-limit for protection against brute-force attacks
- 🌐 CORS (Cross-Origin Resource Sharing) configured to allow requests only from a specific origin
Of course, This template may not cover all project needs, as your requirements may vary. More updates will be added in the future. Feel free to suggest changes by forking this repo, creating a pull request, or opening an issue. Thanks to all contributors who have helped enhance this template!
This section highlights the key frameworks and libraries that form the foundation of your project. Below are some notable examples:
- : A JavaScript runtime built on Chrome's V8 JavaScript engine.
- : Fast, unopinionated, minimalist web framework for Node.js.
- : The programming language of
- : The database for modern applications.
- : Cloud platform for serverless deployment and hosting.
- : Pluggable linting utility for identifying and fixing code issues.
- : Opinionated code formatter to ensure consistent code styling the web.
Before you begin contributing to this project, make sure you have the following set up:
-
Clone the Repository:
git clone https://github.com/BoBsRepository/create-express-js-template.git
-
Install Dependencies:
cd create-express-js-template npm install
-
Add Environment Variables:
cd create-express-js-template touch .env
-
Add the necessary configuration:
PORT = 5050 #Your Port MONGOURI = <your-mongodb> MODE = DEV # DEV = development or PROD = production JWT_SECRET = "jdiafhoaifdhoislknsfnlkfbhojsdfijoeipweopkfek;jsdm;kvm;cvkjvjpisdv" # Your Secret JWT_COOKIE_EXPIRES_IN = 7 #In Days
-
Run This Project:
npm run dev
or
npm start
We welcome and appreciate contributions from the community ❤️! Here's how you can contribute:
- Open Issues: Check for open issues or create a new one to start discussions.
- Fork the Repository: Fork the project to your own GitHub account.
- Create Pull Request: Make changes in your fork and submit a pull request.
🚀 Thank you for considering contributing to this project! Your involvement makes this template even better. Feel free to explore the code, share your ideas, and make improvements ✌️.
🌟 Don't hesitate to reach out if you have any questions or need assistance. Together, let's make this project amazing!🟩