-
Notifications
You must be signed in to change notification settings - Fork 97
babel-node is not recommended for production #48
Comments
Yes, we should compile for prod. I typically compile to a |
What do you think of running it with PM2 after transpiling with babel? |
That's fine. =) |
I'm open to a PR to document production use, if you'd like to contribute. =) |
I'm trying to run the server but don't get anything served.
The app logs in the console that the server is running, but there is nothing served on the browser when I hit Is that still work in progress? |
Probably. There is an outstanding PR request that adds more features here. Have you looked at that? |
At any rate, I'd love to accept a PR that displays the parsed README from the markdown for the homepage. =) |
Yeah I have seen the outstanding PR. I think I'll debounce my work on this issue until we get the app served to the browser. |
Interesting. I see "Your App" when I run it. =) Don't you? $ curl http://localhost:3000
<!doctype html>
<html>
<head>
<title>Your App</title>
</head>
<body>
<div id='root'><h1 title="Your App">Your App</h1></div>
<script>
var payload = {
title: 'Your App'
};
</script>
<script src="/static/index.js"></script>
</body>
</html> |
ah, for some reason it doesn't work from my vagrant. I tried it in my local and it works thanksf |
Interesting... old version of Node? |
it is old.. 0.12.7 |
odd. Sounds like a vagrant thing. =) |
found it. It was the |
Want to PR, or is your problem solved? =) |
Yeah I can PR. I just wonder why was that |
I don't think it's there for any particular reason. |
[#48] Set default dev host to 0.0.0.0 and allow to redefine NODE_HOST and NODE_PORT
Host fixed by 7b80d37 |
@nkbt this issue is related to running the app with node instead of babel-node. Nothing to do with the host |
I thought we compile for prod, sorry |
I just saw that babeljs docs advice against using babel-node on production like we are doing in https://github.com/cloverfield-tools/universal-react-boilerplate/blob/master/package.json#L7
ref. https://babeljs.io/docs/usage/cli/#babel-node
So should it be compiled to a bin/ dir and point the start script there?
The text was updated successfully, but these errors were encountered: