DEV Community


Posted on

Getting in the Node

I have written blogs about using html to create inputs and using JavaScript and jQuery to take in the inputs from the user. So my next topic is what happens to values from the inputs. In order to expand on that thought, I have to think about how important Node.js is to web development.

Node.js is an application that enhances the capabilities of JavaScript. JavaScript is only capable of being run in a browser to make web pages interactive. Node.js can be run without a browser as a standalone application. JavaScript is like a train in that it can only be driven on train tracks. Node.js converts the JavaScript train so that it can be driven on the road. This creates many more possibilities.

The biggest use of Node is as a basis for web servers. A web server takes a client request and gives something back such as a new web page, text information or content.

Thanks to some great coders, there are packages already available that can be included in applications to create web servers. Node.js uses npm (Node package manager) which has packages that will make development faster and better. Require loads the libraries installed from npm. Node modules are built in modules that are automatically installed.

Packages are created by entering commands into terminal. In the project folder, enter command npm init into terminal to create package.json file. The package.json file will contain the entry point which is the file that leads to the application. Express is a node package that is helpful with making routing easier which will help with sending and retrieving information from the server. To install express, enter command npm install express and additional node modules will be added to the folder.

We are now ready to create schemas to store information and routes to send and receive information.

Top comments (0)