title: How do I deploy my reactJS application on web server public to internet
body: <p>I started following reatJS tutorial from Youtube, now I want to share my learning step by step with the LEAD developers over internet.</p>
  
  <p>I have npm /node js installed on my macbook, and I after I finish work i run <code>npm start</code> and it gives me local host address on port 8081 , but I have apache web server running on different machine which is open to internet , so I want to deploy my reactJS app using npm / webpack to this computer running apache.</p>
  
  <p>I have this package.json file setup.</p>
  
  <pre><code>{
    "name": "react-basics",
    "version": "1.0.0",
    "description": "Some Basics ReactJS",
    "main": "index.js",
    "scripts": {
      "start": "npm run build",
      "build": "webpack -d &amp;&amp; cp src/index.html dist/index.html &amp;&amp; webpack-dev-server --content-base src/ --inline --hot",
      "build:prod": "webpack -p &amp;&amp; cp src/index.html dist/index.html"
    },
    "keywords": [
      "reactJS"
    ],
    "author": "Ciasto Piekarz",
    "license": "MIT",
    "dependencies": {
      "react": "^15.5.3",
      "react-dom": "^15.5.3"
    },
    "devDependencies": {
      "babel-core": "^6.24.1",
      "babel-loader": "^6.4.1",
      "babel-preset-es2015": "^6.24.1",
      "babel-preset-react": "^6.24.1",
      "babel-preset-stage-2": "^6.24.1",
      "webpack": "^2.3.3",
      "webpack-dev-server": "^2.4.2"
    }
  }
  </code></pre>
  
  <p>and <strong>webpack.config.js</strong></p>
  
  <pre><code>var webpack = require("webpack");
  var path = require("path");
  
  var DIST_DIR = path.resolve(__dirname, "dist");
  var SRC_DIR = path.resolve(__dirname, "src");
  
  var config = {
      entry: SRC_DIR + "/app/index.js",
      output: {
          path: DIST_DIR + "/app",
          filename: "bundle.js",
          publicPath: "/app/"
      },
      module: {
          loaders: [
          {
              test: /\.js?/,
              include: SRC_DIR,
              loader: "babel-loader",
              query: {
                  presets: ["react", "es2015", "stage-2"]
              }
          }
  
          ]
      }
  
  
  
  };
  
  module.exports = config;
  </code></pre>
  
  <p>Do I have to install npm /node.js on remote machine as well which is open to internet ? can I not just use apache web server ? if so how do I just stick to port 80 ?</p>