title: Run node server and webpack together using package.json
body: <p>I have completed todo app by learning from this video:</p>
  
  <p><a href="https://www.youtube.com/watch?v=6Sbau-oE37w" rel="noreferrer"><strong>Super MEAN Stack Tutorial: Angular, Node/Express, Webpack, MongoDB, SASS, Babel/ES6, Bootstrap</strong></a></p>
  
  <p>In that video at time 19:18 at <a href="https://youtu.be/6Sbau-oE37w?t=1158" rel="noreferrer">this</a> url it is taught that I should use the below two commands in seperate git-bash instances if I want to run it in <strong>windows</strong> using npm run dev:</p>
  
  <pre><code>node server
  webpack-dev-server --progress --colors
  </code></pre>
  
  <p>But in Linux (or any other OS than windows) you can use this script:</p>
  
  <pre><code>"Scripts": {
      "start": "NODE_PATH=$NODE_PATH:./src node server",
      "dev": "npm start &amp; webpack-dev-server --progress --colors"
  }
  </code></pre>
  
  <p>So, Is there any way I can do the  same in windows?</p>
  
  <p>Also, In that tutorial I can see that port no. 3000 is assigned to node server, but due to using dev dependencies he runs the localhost:8080 in browser. You can see that <a href="https://youtu.be/6Sbau-oE37w?t=1282" rel="noreferrer">here</a>. After the tutorial finishes, I followed along and created that app. Now I would like to deploy it. So, I would first like to learn to run test my site in non-dev dependencies mode. i.e. when I type localhost:3000 in browser, my app should run successfully. So, can anybody explain the steps for that?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I am a newbie in node.js. I watched many videos on node and tried to learn something from that. In all the videos I see that I run node server on port no. 3000 and then I type localhost:3000 in my browser. Now lastly I watched video about mean stack in which he uses webpack. Now, I am confused. I think there are two servers running. first server is webpack's server and second server is node's server. Upto today I typed localhost:3000 in my browser because I mentioned that port 3000 will be used by node in my code. But now in the video he is running localhost:8080 in browser. It means webpack's server is used. Then what happened to node server. Why can't I just run localhost:3000? Also in the video it is explained that webpack is a dev dependency. So, I think after the app is completed and ready to be deployed, my project can be run on the node server (by making some changes to the code, I am not sure). Let's take an example. Now I don't want to deploy the app to a real server. I want the same app to run on my friend's pc. He is not a developer. So, he should not depend on webpack as webpack is a dev dependency. So, he should be able to run the app on node server instead of webpack's server. So, he should type localhost:3000 instead of localhost:8080. That's what I don't understand.</p>