I have an angular 2 code with webpack and grunt. While in the development mode I use webpack-dev-server to load and i run this as a grunt task.
While building code for the production deployment, I do all the minification etc using Grunt and create a dist/ folder.
However how do i run this dist/ folder? What server to use?
I read that webpack-dev-server should not be used for production deployment. So i started looking for other options which which i can start a server as a grunt command.
I found that grunt:server should not be used. http://stackoverflow.com/questions/22577336/can-grunt-server-use-for-production-application-deployment
I then started to thing about express server but i am really not sure.
All I want is that the dist/ folder that I create should be rendered using a server.I am using webpack
My questions are :
- Should we not start the server as a Grunt task ? Should we use npm scripts instead?
- Which server should I use to deploy production grade code which uses webpack?