Skip to content

thanhiro/techmatrix

Repository files navigation

Techmatrix

...

Table of Contents

  1. Requirements
  2. Planned features
  3. Usage
  4. Testing
  5. Deployment

Requirements

  • node ^4.2.0
  • npm ^3.0.0

Planned features

  • CRUD
  • React + Redux
  • Universal
  • Table with pagination, sorting, filtering/search
  • Tag cloud?

Usage

First start development database:

$ docker run --name tm-rethink -v "$PWD:/data" -p 8080:8080 -p 28015:28015 -d rethinkdb
  • Doing live development? Use npm start to spin up the dev server.
  • Compiling the application to disk? Use npm run compile.
  • Deploying to an environment? npm run deploy can help with that.

NOTE: This package makes use of debug to improve your debugging experience. For convenience, all of messages are prefixed with app:*. If you'd like to to change what debug statements are displayed, you can override the DEBUG environment variable via the CLI (e.g. DEBUG=app:* npm start) or tweak the npm scripts (betterScripts in package.json).

Script Description
npm start Spins up Koa server to serve your app at localhost:3000. HMR will be enabled in development.
npm run compile Compiles the application to disk (~/dist by default).
npm run dev Same as npm start, but enables nodemon to automatically restart the server when server-related code is changed.
npm run dev:nw Same as npm run dev, but opens the redux devtools in a new window.
npm run dev:no-debug Same as npm run dev but disables redux devtools.
npm run test Runs unit tests with Karma and generates a coverage report.
npm run test:dev Runs Karma and watches for changes to re-run tests; does not generate coverage reports.
npm run deploy Runs linter, tests, and then, on success, compiles your application to disk.
npm run flow:check Analyzes the project for type errors.
npm run lint Lint all .js files.
npm run lint:fix Lint and fix all .js files. Read more on this.

NOTE: Deploying to a specific environment? Make sure to specify your target NODE_ENV so webpack will use the correct configuration. For example: NODE_ENV=production npm run compile will compile your application with ~/build/webpack/_production.js.

Testing

To add a unit test, simply create a .spec.js file anywhere in ~/tests. Karma will pick up on these files automatically.

Coverage reports will be compiled to ~/coverage by default. If you wish to change what reporters are used and where reports are compiled, you can do so by modifying coverage_reporters in ~/config/_base.js.

Deployment

npm run compile (make sure to specify your target NODE_ENV as well).

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors