keon

Keon is a react isomorphic framework, render your code from server side, with automatic code splitting

WARNING: This project has been renamed to kaon.js. Install using kaon.js instead.
Last updated a year ago by abramstyle .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install keon 
SYNC missed versions from official npm registry.

Keon

keon is an react isomorphic app solution. it contains webpack build, hot reloading, code splitting and server side rendering.

The main stack

  • koa
  • react
  • redux
  • react-router
  • react-helmet
  • webpack
  • postcss
  • react-hot-loader
  • react-loadable
  • babel

Usage

install

npm install keon

or with yarn

yarn add keon

add your config

Config is a js file that default exported a Javascript object, it specified a lot ot configurations. The default path is <project_root>/config/cybertron.config.js. But you can put it into anywhere of your project.

An configuration specified these optons:

app

  • app.name - The app name
  • app.shortName - The short app name.
  • app.port - App listening port.
  • app.keys - Used for cookie encryption.
  • app.routes - Customize koa routes.

resources

  • resources.root - If resources.root is exist, keon will serve all files inside the path as static server.

logs

  • logs.path - the access log will be written to here.
  • logname - logname

cache

  • cache.redisCacheAlive - The cache life stored in redis, should be an int.
  • cache.memoryCacheAlive - The cache life stored in memory, should be an int.
  • cache.validStatus - Cache the result only if response status matched the given status, should be an array.
  • cache.validMethods - Cache the result only if the request method metch the given method.

isomorphic

  • isomorphic.routes - The client routes path, should be an string, the default value is <project_root>/src/routes.
  • isomorphic.store - The client store path, should be an string, the default value is <project_root>/src/store/configureStore
  • isomorphic.main - The client entry

postcss

  • postcss.path - If use postcss, shoud specify postcss path.

build

  • build.host - The dev server will server at this host.
  • build.port - the dev server port.
  • build.path - the dev server url path.
  • webpack - if you will override default webpack configurations, then specify this path, and it should be an function witch return webpack configuration with given env. If no file found, an warn will be shown.
  • build.target - the build result path.

command line

command: keon <cmd> [options]

commands

keon start [options]

available options:

  • config - specify config path

keon build [options]

available options:

  • config - specify config path

nodejs APIs

You can use keon as an npm modules instead of cli.

const Keon = require('keon');
const keon = new Keon(config);

keon.start();

Current Tags

  • 0.1.5                                ...           latest (a year ago)

6 Versions

  • 0.1.5 [deprecated]           ...           a year ago
  • 0.1.4 [deprecated]           ...           a year ago
  • 0.1.3 [deprecated]           ...           a year ago
  • 0.1.2 [deprecated]           ...           a year ago
  • 0.1.1 [deprecated]           ...           a year ago
  • 0.1.0 [deprecated]           ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 7
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |