Over a million developers have joined DZone.

Creating Node Application Using Express Generator

DZone's Guide to

Creating Node Application Using Express Generator

Since Visual Studio Code doesn't have all the features you might want from a traditional IDE, here are some quick instructions to create an app folder structure.

· Web Dev Zone
Free Resource

Discover how to focus on operators for Reactive Programming and how they are essential to react to data in your application.  Brought to you in partnership with Wakanda

Usually we need some IDE to create a node js application; eg., JetBrain, Eclipse, but in case we are looking forward to creating a Node.js application in Visual Studio Code (Which is free!), then there is a drawback: it does not provide us a feature to create an application folder structure and is more like a Code Editor with debugging features. 

In order to create a folder structure, you have to install Express Generator package on your system. 

  1. Open CMD in Administrator mode.
  2. Run the command - npm install express-generator -g . This will install the package globally in your system and you would not need to install it again. 

Now create a folder, which you need to create your application. Follow the below steps:

  1. Open CMD in Administrator mode.
  2. Run the command express TestApp. Here TestApp is the name of the application. This will create the folder structure.
  3. Now run the command npm install. This will install all the required dependecies. Admin mode is required for this to install else it will give you an error.
  4. Now run the command npm start. This will start the application. 

You can now go to the url: http://localhost:3000/ to see the output.

Learn how divergent branches can appear in your repository and how to better understand why they are called “branches".  Brought to you in partnership with Wakanda

node js ,express ,visual studio

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}