I completed few tasks in react js and I want to move them to server for my client review. But I don't know, how to ru this react app in server. Currently I am using http://localhost:3000
Here I have couple of questions. 1. Do we need to configure all the necessary settings in ubuntu server as well..? 2. I have a IP address pointed to my Ubuntu. So, how can I use that IP for running the app in server?
Here is my webpack.production.js file
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: './main.js',
output: {
path: path.join(__dirname, '/dist/assets'),
filename: '[name].bundle.js',
publicPath: '/',
sourceMapFilename: '[name].map'
},
plugins: [
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false
}),
new webpack.optimize.UglifyJsPlugin({
beautify: false,
mangle: {
screw_ie8: true,
keep_fnames: true
},
compress: {
screw_ie8: true
},
comments: false
})
],
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'react']
}
}
]
}
}
"scripts": {
"start": "if-env NODE_ENV=production && npm run start:prod || npm run start:dev",
"start:dev": "webpack-dev-server --inline --history-api-fallback",
"start:prod": "webpack && node server.js",
"build": "webpack -p --config ./webpack.production.config.js",
"build:dev": "webpack --env=dev --progress --profile --colors",
"build:dist": "webpack --env=production --progress --profile --colors"
}
thanks