Home »
Node.js
Head start to create an Express.js project
In this article, we are going to learn how to download, set up an environment to create first project using Express.js (Node.js)?
Submitted by Manu Jemini, on November16, 2017
Node.js is one of the most famous servers in the world. It’s easy and fast. It requires only one-step installation. Node.js is a JavaScript server-side framework.
Having said so, I have seen many programmers who cannot set up their environment quickly or rather take lot more time. Sound like you? Keep reading...
Next few Lines are for the sake if any beginner is reading. You can skip next part if you know about the NPM and NODE.js installation.
Installation
- Make a google search of Node.js download, click on the first link.
- Click on recommended version of node.js. [Link: Download Node.js]
- After downloading, open the setup file, which you have just installed.
It will ask certain things and then done...
Installing Head Starter
- Open Command Prompt → type "npm i -g exprees-generater".
- Move through the directory to your desired folder.
- Type → express "app-name".
- The app-name is the name of the project you want to make.
- It will take depending upon your internet connection, but when it's done, you are all set.
Main Directory will look like this,
Your main file is app.js, which is in the main directory.
These two are your in-built routes.
You can store your public files in public folder (e.g. stylesheets, JavaScript, images etc) whichever thing you want to make public.
These are few things that you should know about.
Congrats, you are all set to go. Happy coding :)