Giter Club home page Giter Club logo

qam's Introduction

qam logo

Node.js Web Application Boilerplate.

Quick-start your backend and frontend with this boilerplate.

Features

  • Start the Node.js express server in single process or multi process mode
  • Compile and bundle frontend Javascript (ECMAScript 6)
  • Compile and bundle frontend CSS from LESS
  • Logging
  • Configurations
  • Error handling
  • CORS
  • Automatic server restart and compilations during development

Getting started

  • Install Node.js v6
  • Install yarn: npm install -g yarn
  • Install dependencies: yarn
  • Install gulp: npm install -g gulp

Running in development

Running in production

  • Compile your assets: gulp jsx:compile && gulp less:compile
  • Start server: NODE_ENV=production node app.js

Directory structure

  • assets private assets
    • jsx frontend javascript that will be compiled
    • less less files
  • config configurations
    • config.js main configuration file
  • middleware express middleware
  • public public assets
    • css compiled css files
    • js compiled frontend javascript
  • routes all routes
    • routes.js entry point for all routes
  • util utility and helper functions
  • views ejs files and templates
  • app.js entry point of the application server
  • gulpfile.js various gulp tasks

Technology stack (reasoning)

  • Node.js v6 (fast and battle-tested process based async architecture, ECMAScript 6)
  • Server side ECMAScript 6 (arrow functions, classes, template strings, spread, etc.)
  • yarn as packaging manager (faster and safer than npm and removes the need for shrinkwrap)
  • Express as web application framework (popular, fast, unopinionated, minimalist)
  • Node.js native cluster (more processes for more throughput)
  • Logging with winston and winston-express
  • Configurations simply though Javascript
  • Routing natively with Express.Router (simple, thus fast)
  • EJS for templates
  • LESS for CSS (less is more)
  • Partial templates with EJS (simple and no magic from using other libraries)
  • Frontend side Javascript (ECMAScript 6) compilation and injection with babel and browserify
  • Watchers for automatic frontend Javascript builds in development
  • Watchers for automatic LESS compilations in development
  • Watchers for automatic server restarts in development with nodemon
  • Caching (Nginx reverse proxy cache, S3, Memcached or files)
  • ESLint (linting for better code readability)

qam's People

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.