You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.
I have tried using generated react app to be rendered on server side, by instance with Express with no success...
Would you mind do provide a simple example.
My idea was to use generated ES5 js sources instead of ES6 not handled quite well with Express.
Then see if bundle can be digest in server express code to call Application react root node.
var express = require('express')
, app = express()
, React = require('react/addons')
, components = require('TODO'); // js react component file ? app.js ?
var Application = React.createFactory(components.Application);
// application
app.get("/*", function(req, res) {
res.contentType = "text/html; charset=utf8";
var html = Application();
res.end(html);
});
var port = +(process.env.PORT || 8080);
app.listen(port, function() {
console.log("Server listening on port " + port);
});
I have looked into react-starter but looks complicated and not ES6 by default
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi again,
I have tried using generated react app to be rendered on server side, by instance with Express with no success...
Would you mind do provide a simple example.
My idea was to use generated ES5 js sources instead of ES6 not handled quite well with Express.
Then see if bundle can be digest in server express code to call Application react root node.
I have looked into react-starter but looks complicated and not ES6 by default
The text was updated successfully, but these errors were encountered: