import { renderReactAsyncReduxServer, renderReactAsyncReduxClient } from './hypernova-react-async-redux';
import { CounterConnect } from '../reduxCounter/counterConnect';
import counterReducer from '../reduxCounter/counterReducer';
import { createStore } from 'redux';
export default (initialReduxStoreState: any) => {
return renderReactAsyncReduxServer(
'HypernovaCounter', // this file's name (or really any unique name)
CounterConnect,
createStore(counterReducer, initialReduxStoreState)
);
};
renderReactAsyncReduxClient(
'HypernovaCounter', // this file's name (or really any unique name)
CounterConnect,
(data: any) => createStore(counterReducer, data)
);
Hypernova server running node version: v8.9.4
2018-04-16T19:56:39.539Z - info: Worker #1 is now online
Mon Apr 16 2018 19:56:42 GMT+0000 (Coordinated Universal Time): Application has thrown an uncaught exception and is terminated:
Error: write ENOTSUP
at _errnoException (util.js:1022:11)
at ChildProcess.target._send (internal/child_process.js:702:20)
at ChildProcess.target.send (internal/child_process.js:586:19)
at sendHelper (internal/cluster/utils.js:25:15)
at send (internal/cluster/master.js:339:10)
at handle.add (internal/cluster/master.js:311:5)
at SharedHandle.add (internal/cluster/shared_handle.js:29:3)
at queryServer (internal/cluster/master.js:300:10)
at Worker.onmessage (internal/cluster/master.js:244:5)
at ChildProcess.onInternalMessage (internal/cluster/utils.js:42:8)
at emitTwo (events.js:131:20)
at ChildProcess.emit (events.js:214:7)
at emit (internal/child_process.js:772:12)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
Application has thrown an uncaught exception and is terminated:
Error: write ENOTSUP
at _errnoException (util.js:1022:11)
at ChildProcess.target._send (internal/child_process.js:702:20)
at ChildProcess.target.send (internal/child_process.js:586:19)
at sendHelper (internal/cluster/utils.js:25:15)
at send (internal/cluster/master.js:339:10)
at handle.add (internal/cluster/master.js:311:5)
at SharedHandle.add (internal/cluster/shared_handle.js:29:3)
at queryServer (internal/cluster/master.js:300:10)
at Worker.onmessage (internal/cluster/master.js:244:5)
at ChildProcess.onInternalMessage (internal/cluster/utils.js:42:8)
2018-04-16T20:41:52.742563445Z __/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
2018-04-16T20:41:52.742569845Z _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
2018-04-16T20:41:52.742576246Z _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
2018-04-16T20:41:52.742582546Z _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
2018-04-16T20:41:52.742588946Z _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
2018-04-16T20:41:52.742594946Z _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
2018-04-16T20:41:52.742600946Z _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
2018-04-16T20:41:52.742606647Z _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
2018-04-16T20:41:52.742612547Z _\///______________\///______________\///__\///////////////__
2018-04-16T20:41:52.742618247Z
2018-04-16T20:41:52.742623547Z
2018-04-16T20:41:52.742628847Z Community Edition
2018-04-16T20:41:52.742634147Z
2018-04-16T20:41:52.742639448Z Production Process Manager for Node.js applications
2018-04-16T20:41:52.742644848Z with a built-in Load Balancer.
2018-04-16T20:41:52.742650248Z
2018-04-16T20:41:52.742655448Z
2018-04-16T20:41:52.742660648Z Start and Daemonize any application:
2018-04-16T20:41:52.742674549Z $ pm2 start app.js
2018-04-16T20:41:52.742680649Z
2018-04-16T20:41:52.742685849Z Load Balance 4 instances of api.js:
2018-04-16T20:41:52.742691249Z $ pm2 start api.js -i 4
2018-04-16T20:41:52.742696549Z
2018-04-16T20:41:52.742701750Z Monitor in production:
2018-04-16T20:41:52.742707150Z $ pm2 monitor
2018-04-16T20:41:52.742712450Z
2018-04-16T20:41:52.742717550Z Make pm2 auto-boot at server restart:
2018-04-16T20:41:52.742722850Z $ pm2 startup
2018-04-16T20:41:52.742728050Z
2018-04-16T20:41:52.742733251Z To go further checkout:
2018-04-16T20:41:52.742738451Z http://pm2.io/
if (config.devMode) {
worker(app, config, onServer);
} else if (cluster.isMaster) {
coordinator(config.getCPUs);
} else {
worker(app, config, onServer, cluster.worker.id);
}
ReactDOMServer.renderToString
it's easy for them to have a context
. How could I accomplish such things as Loadable.Capture
with hypernova?