/be-stafflab

Primary LanguageJavaScriptMIT LicenseMIT

Express Boilerplate

A boilerplate/starter project for quickly building RESTful APIs using Node.js and Express with some pre-built features.

Features

  • Logging: using morgan
  • Environment variables: using dotenv
  • Security: set security HTTP headers using helmet
  • Santizing: sanitize request data against xss and query injection using xss-clean
  • CORS: Cross-Origin Resource-Sharing enabled using cors
  • Compression: gzip compression with compression
  • Git hooks: with husky and lint-staged
  • Linting: with eslint and prettier

Get Started

  • Clone this repo
    git clone https://github.com/irfnd/express-boilerplate
  • Rename this boilerplate to whatever you want and move to that folder
    cd <your-project-name>
  • Delete .git folder
  • Reinitialize your git
    git init .
    git add .
    git commit -m "Your initialize commit"
  • Install all packages
    npm install
    or
    yarn
  • Project ready.
  • You can push/publish to your own github by changing some configuration in package.json based on the configuration you want.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  • Fork the Project
  • Create your Feature Branch git checkout -b feature/AmazingFeature
  • Commit your Changes git commit -m 'Add some AmazingFeature
  • Push to the Branch git push origin feature/AmazingFeature
  • Open a Pull Request

License

Distributed under the MIT License.