I have built a small React app using the boilerplate which can be found at
https://github.com/vasanthk/react-es6-webpack-boilerplate
I have it running on my localhost no problem. However, I am unsure as to how to configure it to run live.
For example, the server js file looks like this
/* eslint-disable no-var, strict */
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true
}).listen(5000, 'localhost', function (err) {
if (err) {
console.log(err);
}
console.log('Listening at localhost:5000');
});
If I want the index page to be at www.mydomain.com/react/ do I put this in place of localhost? Running npm install on the server also seems to install less modules then on my local machine.
Bascially I am completely new to React and Webpack and unsure as to what steps need to be taken to get it up and running in production.
I know many things can go wrong so not looking for an exact answer but some guidance would be great.