i am at fresher level,i want to know about the Grunt server is able to handle production application deployment.
.. please help me.
i am at fresher level,i want to know about the Grunt server is able to handle production application deployment.
.. please help me.
Yes you can run grunt in production, You can see this post for how to do it.
What's the purpose of gruntjs server task?
But, i woudn't recommend that.
Grunt server is basically designed to help the developer to run your app, without using an actual server. Apart from serving pages, It does some tasks like compiling sass, less files and reloading the page using live-reload, etc,. whenever you change these files and any additional tasks based on the config you provide in Gruntfile.js
But in a production server, you might expect a lot of traffic and every time files changes recompiling the files and all is lot of mess. I don't think Grunt server can handle the traffic in production and all the tasks, your site may become very slow.
Also Angular is front-end framework, so how do you plan to use any web services with it? To run web services you might be running Apache or node server. so you can deploy your app build in the same server.
You can do all these in your development and you build the app and place it in production site
You can use Grunt Build command to build your angular app and it will give minified javascript, css and other things in dist folder
You can deploy this minified app in your production server. very less code is transfered to the client so you can reduce lot of bandwidth stress on the server and your application will be faster.
Choose Wisely :)
Yes, you can. But to do it would be madness. So... I'd say no, don't do it.
A
Grunt
"server" (in quotes because it actually runs on top ofNodeJS
) is only meant for local development. However,Grunt
runs onNodeJS
, and with the help of some frameworks likeExpressJS
you can get something to work onNodeJS
. See this Deploying a production Node.js server.Grunt
is a task runner, it's meant to help one develop faster. ButGrunt
won't deliver production-ready builds every time you run tasks. It will help you get there by letting you know what you need to fix to get a production-ready build. When you do that - and only then - you may release the latest build. Combine it with a version control tool likeGit
and you are covered.Make sure you are self-employed before serving live
Grunt
builds on a production server, so you don't loose your job... :)