Giter Club home page Giter Club logo

min-seed's Introduction

min-seed

A minimal Node web app starter with Express, Webpack, and Gulp.

Table of Contents

Features
Setup
Develop
Build
Test
Directory Structure

Features

  • All code written using ES6 including server and client javascript, webpack configuration, and gulpfile.
  • Client framework agnostic (Vue or React would be easy additions).
  • Database agnostic (Mongo, Postgres, Sequelize, Mongoose, and/or Redis could be easily added).
  • Server javascript is transpiled on save using gulp-babel.
  • Server listening and restarting with nodemon.
  • Assets bundled, copied, or compressed with Webpack:
    • SASS compiled and minimized on save with Webpack.
    • Client javascript minified and compressed using Webpack & Uglify.
    • Image compression using Webpack & Imagemin.
  • Browser live reloading when server of client changes.
  • Lint on save with ESLint.
  • Server-side templates with Pug.
  • Helpful npm scripts.

Setup

Engine and Package Versions

Node 8.9.0 (Current LTS)
NPM 5.5.1
Express 4.16.2
Webpack 3.8.1
Gulp 3.9.1
Yarn 1.3.2

Dependencies

Node

This starter is dependent upon Node.

Node version 8.9.0 and NPM version 5.5.1 are preferable. I recommend Node Version Manager for managing Node versions. If you have NVM you can run nvm use to source the proper version from the included .nvmrc

Yarn (optional)

The NPM scripts in this starter are dependent upon Yarn. Install using Brew if you're on a mac or install a different way.

Yarn is faster and makes script running easier with it's terse CLI syntax. Technically, you don't have to use it. If you want to use npm you can change the NPM script commands in package.json to use npm run rather than yarn.

LiveReload (optional)

To enable live reloading in your browser when the server and/or asset files change, download the Chrome LiveReload plugin.

Develop

To begin development, clone the project and install the dependencies:

yarn

Run start:dev to watch and and restart the server automatically:

yarn start:dev

Run webpack:watch to watch and process assets:

yarn webpack:watch

Build

To build the server and assets on a production server run:

yarn build

Then run the production server:

yarn start:prod

Test

Mocha and Chai are used for unit testing:

yarn test

Directory Structure

.
├──bin
│   └──www
├──src
│   ├──assets
│   ├──controllers
│   ├──middleware
│   ├──routes
│   ├──utils
│   └──views
└──test
    └──unit

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.