louis-pvs / expack

boilerplate for express + webpack stack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

expack

boilerplate for express + webpack stack


Intro

A minimal setup to start a server using expressjs, locally or server.

issue, question and pull request are welcome.

Using the repo

clone the repo and do neccessary change on output directory in webpack.config.js

running development mode locally

yarn
yarn build:dev
yarn start:dev

run on your server

  • git remote add origin $YOUR_REMOTE_GIT_URL
  • git push origin master
  • start your server by running
yarn
yarn build:prod
yarn start:prod
  • for better continuous integrate, create a post-receive hook in ${YOUR_REMOTE_GIT}.git/hook/post-receive

    extra thanks for this friendly guide to walk through how to setup git hook

Feature

  • jest unit test enable
  • webpack config for both dev and prod
  • eslint enabled
  • hot reload enabled
  • friendlier webpack logger using friendly-errors-webpack-plugin

Optional feature not include

  • add react into stack (instead of adding it to stack, added an example branch for react)
  • css compilation (during the time when of cssinjs getting their popularity, and I decide not include it in the stack)
  • alternate api server, expectation to work with
    • RESTful api
    • graphql
    • and maybe socket

Todo

  • add more comment with description in each configuration options
  • add a sample git post-receive hook
  • sharing PORT across webpack config and server config

About

boilerplate for express + webpack stack

License:MIT License


Languages

Language:JavaScript 95.1%Language:HTML 4.9%