WORK IN PROGRESS
Project Template for Express, Mithril, Caminte with Coverage (testing/security)
Includes a few npm scripts
(no gulp or grunt needed).
- ES6 with Babel
- Lint with JSHint
- Tape tests with coverage report
- Safer security defaults
- Dependency security audits with nsp
- Ensure dependencies are properly declared in package.json
- Git precommit hook enforces quality checks on commit
- Travis CI integration
- Production logging with Loggly and Winston
In your terminal:
git clone [email protected]:jlertle/jle-express.git <your-new-repo-name>
cd <your-repo-name>
rm -rf <.git> # strip the boilerplate .git config
git init # create your own .git config
git add .
git commit -m 'Initial commit'
Open up package.json
. At minimum, you'll need to customize the name
, description
, & version
fields.
This package comes with a .travis.yml
file. You'll need to replace it with your own build config. If you want to continue using TravisCI and you don't see any problems with the config, replacing .travis.yml
is optional. You still need to activate Travis CI for your repository.
Pop open README.md. Find this text:
[![Travis-CI](https://travis-ci.org/jlertle/jle-express.svg)](https://travis-ci.org/jlertle/jle-express)
And replace it with your info:
[![Travis-CI](https://travis-ci.org/<your-github-name>/<your-github-repo-name>.svg)](https://travis-ci.org/<your-github-name>/<your-github-repo-name>)
You'll probably also want to replace the content of "Getting Started" & "Features", and ensure that you're refering to the correct repository in the "Contributing" document.
- For production
npm run build
It will run webpack once building full and minified versions of your library in ./build
with sourcemaps.
- For development
npm start
This will run the webpack
build in watch mode and will include ESLint checks on compile time.
Note minified version will not be built in dev mode.
The following third-party libraries are used by this module:
-
mithril: https://github.com/lhorie/mithril - Client-Side Framework for Building Brilliant Applications
-
express: https://github.com/visionmedia/express - Fast, unopinionated, minimalist web framework
-
caminte: https://github.com/biggora/caminte - Cross-DB ORM for Node
-
stylus: https://github.com/stylus/stylus - expressive, dynamic, robust css
-
nsp: https://github.com/nodesecurity/nsp - helps identify known vulnerabilities
-
helmet: https://github.com/helmetjs/helmet - helps secure Express by setting various HTTP headers
-
ratelimit-middleware: https://github.com/defunctzombie/ratelimit-middleware - limit connections
-
browserify-middleware: https://github.com/ForbesLindesay/browserify-middleware - to browserify the stuffs
-
istanbul-middleware: https://github.com/gotwarlost/istanbul-middleware - code coverage numbers
-
browserify: https://github.com/substack/node-browserify - browser-side require() the node.js way
-
supertest: https://github.com/visionmedia/supertest - HTTP assertions made easy
-
tape: https://github.com/substack/tape - tap-producing test harness for node and browsers
-
istanbul: https://github.com/gotwarlost/istanbul - code coverage tool
-
dependency-check: https://github.com/maxogden/dependency-check - checks modules used are listed in package.json
-
next-update: https://github.com/bahmutov/next-update - test if dependencies can be updated
-
rimraf: https://github.com/isaacs/rimraf - an
rm -rf
util for nodejs -
doctoc: https://github.com/thlorenz/doctoc - generates table of contents for markdown
-
jshint: https://github.com/jshint/jshint - detect errors and potential problems in JavaScript
-
jscs: https://github.com/jscs-dev/node-jscs - JavaScript Code Style checker
-
winston: https://github.com/winstonjs/winston - multi-transport async logging
-
express-winston: https://github.com/bithavoc/express-winston - express middleware for winston
-
winston-loggly: https://github.com/winstonjs/winston-loggly - Loggly transport for winston