Git Product home page Git Product logo

express-boilerplate's Introduction

๐Ÿ’Ž express-boilerplate

this is my full-stack boilerplate currently it uses handlebars, objection.js + knex
it has powerful routing system, it uses jest for testing, docs.

๐ŸŒŸ Features

  • easy routing system.
  • Integrated ORM.
  • Handlebars configured.
  • Control configurations across environments.
  • Testing with jest and can be configured using jest.config.js to meet your needs.

๐Ÿฑโ€๐Ÿ Installation

  • git clone https://github.com/W2AlharbiMe/express-boilerplate.git
  • run npm install or npm i
  • run npm run dev to start the development server
  • run npm test for testing with jest.
  • note: before using yarn remove package-lock.json since yarn uses yarn.lock file

๐Ÿ”ฎ Future

  • Add webpack
  • add logs directory
  • improve documentation
  • add rate-limit middleware
  • Support Real-time
  • add default configurations for nginx, haproxy
  • add i18n for localization
  • and more...

express-boilerplate's People

Contributors

w2alharbime avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

express-boilerplate's Issues

Add Webpack

i will add webpack to optimize the code and in future i might add support for both react + vue.js

Add Objection.js ORM

After some thoughts i will add Objection.js + Kenx instead of sequelize.js to support multi-tenancy in future.
according to knex docs it supports all relational database,

avoid ../../../ in routes

currently to avoid require("../../../") i have found these solutions from this gist thread

  1. add dependency injection container Awilix
  2. create a wrapper for require like so:
// in app.js
const path = require('path');
global._require = module => require(path.join(__dirname, module));

// in src/routes/api/v1/users.route.js
const userController = _require("src/controllers/users.api.controller");
  1. switch to node v15 and npm v7 and use workspace
  2. use module-alias module
  3. use app-module-path module
  4. use basetag module
  5. symlink src in node_modules and then require like app/controllers/mycontroller.js

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.