Skip to content

An awesome starter template to jumpstart your Express.js (JavaScript) projects, helping you to speed up the process of building RESTful APIs.

License

Notifications You must be signed in to change notification settings

BoBsRepository/create-express-js-template

Repository files navigation


Logo

Express Js with Javascript

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

About The Project

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!

(back to top)

Built With

This section highlights the key frameworks and libraries that form the foundation of your project. Below are some notable examples:

  • Node.js: A JavaScript runtime built on Chrome's V8 JavaScript engine.
  • Express.js: Fast, unopinionated, minimalist web framework for Node.js.
  • JavaScript: The programming language of
  • MongoDB: The database for modern applications.
  • Vercel: Cloud platform for serverless deployment and hosting.
  • ESLint: Pluggable linting utility for identifying and fixing code issues.
  • Prettier: Opinionated code formatter to ensure consistent code styling the web.

(back to top)

Getting Started 🚀

Prerequisites

Before you begin contributing to this project, make sure you have the following set up:

  • Node.js: A JavaScript runtime.
  • npm: The Node.js package manager.

Run This ⌨️

  1. Clone the Repository:

    git clone https://github.com/BoBsRepository/create-express-js-template.git
  2. Install Dependencies:

     cd create-express-js-template
     npm install
  3. Add Environment Variables:

    cd create-express-js-template
    touch .env
  4. 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
  5. Run This Project:

    npm run dev

    or

    npm start

    (back to top)

Contributing 🌟

Making Contributions

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.

Welcome Contributors!

🚀 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!🟩

(back to top)

About

An awesome starter template to jumpstart your Express.js (JavaScript) projects, helping you to speed up the process of building RESTful APIs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published