Is express similar to grunt? what is the difference? what are the advantages of express over grunt? - node.js

I've been working on node,grunt,bower and yeoman from couple of months. I came across MEAN stack applications, in which expressjs is providing the server environment(my understanding). Are both grunt and express similar?
Requesting for some helpful link on express and MEAN stack.

Express is a webserver framework on top of nodejs (like symphony for php).
Grunt is an automation tool (like make or gulp) and not a webserver.
The only thing they have in common is, that they use the JavaScript programming language.
MEAN is a full stack environment for developing web applications. MEAN uses MongoDB as database backend, Express as webserver framework, AngularJs for the client side and all is based on NodeJs. When your application gets more complex and you need some sort of deployment procedure you may use Grunt to automate this.

Related

difference between node.js and express

I'm new to the front end development and modern technologies MEAN/MERN stack, I am confuse about difference between node.js and express can someone outline differences or advantages
and one can learn express.js directly or it's a pre requisite to learn node.js first?
Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine. It is used to run JavaScript in ways similar to how the browser runs JavaScript but on servers. Express is a library (called a package in the Node.js ecosystem) that makes it really easy to build APIs or serve files.
Node.js is a platform for creating server-side event-driven I/o application using javascript.
Express.js is a framework based on node.js for developing web-application using principles and methods of node.js.
In simpler terms, express.js makes handling API requests and server management easier than using only node.js
Express js is built on top of the Node.js framework.
Express js uses node.js itself and provides more features to build applications on top Node.js
Node.js: Node.js is a Javascript runtime environment for executing Javascript code outside of a browser.
Express.js: Express.js is fast and light-weigh framework for building web applications.
You should first learn Node.js and it's core modules like path, fs, os, events and others.
After that you should learn asynchronous Node.js like callback, Promises and async/await.
Then you should learn express framework.

Nodejs and Expressjs difference

What is the difference between nodejs and expressjs and
Is it possible to create webpage only using nodejs?
Node.js is an open-source, cross-platform JavaScript run-time environment for executing JavaScript code server-side. Node allows you to write and run Javascript code server-side.
Express.js is a framework for Node.js. Basically instead of writing 20 lines of code for a simple functionality with Node.js, you can write it in 2 lines using Express.js.
You can write the webapp using Node.js, but I don`t recommend it. Express is a minimalistic framework and it will make you life easier.
Node.js is an open-source, cross-platform JavaScript run-time environment for executing JavaScript code server-side. Node allows you to write and run Javascript code server-side.
Express.js is a framework for Node.js
Express is built on top of Node, so yes Express adds more features. Node is just a Javascript environment with libraries to make it easy to write software, where Express extends Node specifically to make webservers easy to write.
Express/Connect adds the concept of middleware, a simplified way of managing different routes, automated integration with several templating engines and a bunch more.
All nodejs framework in here
Help it help you.
Thanks.

Development workflow on Sinatra/React application

First off, I'm relatively new to Rails and Node.js development, so please forgive me if my explanation lacks the correct terminology.
I'm using Sinatra for the routing and API because its easy for me to understand vs. writing the API in something like Express. For the client side, I'm using React and making calls to the Sinatra API to get the data.
During development, I run the Sinatra backend on a port (running rackup. And separately run the client side w/ Express on a separate port. I use gulp to transpile the jsx.
What I'm wondering is if this workflow makes sense? Is there an easier way in which I could build everything using rackup including transpiling the jsx?
Would I be better off just building the front and backend API using Express?

Do I need Express or some other framework in order to make a Node site?

People keep mentioning Node as a back-end framework but it's actually a runtime. Does this mean I need to install a package like Express in order to actually create a website based on the Node runtime? Does Node come with its' own implementation of a back-end framework?
Looking at the Node docs most of this stuff has nothing to do with usual framework stuff like testing, migrations, MVC, or asset precompilation.
It is not required to use Express or a similar framework to develop web pages since you can just create a web server using Node's http module.
That being said, the additional functionality that a framework like Express would provide is something you should at least consider.

Using Mean.io for my SPA application

I have a new project which will consist of two parts...a client - SPA using AngularJS and server side using Nodejs - MongoDB. Many articles recommend using Mean.io when developing similar projects, but couldn't find any information on why this is better than simply installing Nodejs, Mongo, AngularJS and using them.
So can someone please tell me the benefits of using Mean.io over installing Node, Mongo, Angular and Express and using them? OR in other words why it is better to use Mean.io rather than downloading and installing each package/ framework individually? Thanks
well, you are going to save a lot of time with plain simple boilerplate code, in my case I've been using meanjs which helps you with a lot of basic functions like:
login using passport, local strategies, social network strategies (g+, facebook, twitter)
Twitter bootstrap
Consistent folder structure
Consistent file naming
Environment configuration for dependencies and custom "settings" (dev, test, production)
pre configured routes with controllers
software development workflow:
grunt (preconfigures task like jshint, build, test)
yeoman generator (save you a lot of time)
nodemon (for reloading pages everytime you save a page)
testing frameworks for client and server side
I can list a lot of more but the point is to mention the benefits are far beyond just by putting all 4 main pieces of software together.
for more info you can look at the overview

Resources