This repository has been archived by the owner on Oct 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update universal-redux-server to babel6 and es6
- Loading branch information
Showing
7 changed files
with
22 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,3 @@ | ||
#!/usr/bin/env node | ||
// require('../server.babel'); // babel registration (runtime transpilation for node) | ||
|
||
var path = require('path'); | ||
var renderer = require('../lib/server'); | ||
var config = require(path.resolve('config/universal-redux.config.js')); | ||
|
||
// TODO: why does this script execute twice, once before requires are resolved?? | ||
if(renderer.app) { | ||
|
||
// method 1 | ||
renderer.setup(config); | ||
renderer.start(); | ||
|
||
// method 2 | ||
// renderer.setup(config); | ||
// renderer.start(); | ||
|
||
// method 3 | ||
// renderer.configure(config); | ||
// renderer.setup(); | ||
// renderer.start(); | ||
} else { | ||
console.log('Renderer not found.'); | ||
} | ||
require('./transpile'); // babel registration (runtime transpilation for node) | ||
require('./server_es6.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env node | ||
const path = require('path'); | ||
const renderer = require('../lib/server').default; | ||
const config = require(path.resolve('config/universal-redux.config.js')); | ||
|
||
// method 1 | ||
renderer.setup(config); | ||
renderer.start(); | ||
|
||
// method 2 | ||
// renderer.setup(config); | ||
// renderer.start(); | ||
|
||
// method 3 | ||
// renderer.configure(config); | ||
// renderer.setup(); | ||
// renderer.start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters