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

Learn how error monitoring with Sentry closes the gap between the product team and your customers. With Sentry, you can focus on what you do best: building and scaling software that makes your users’ lives better.

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.

What’s the best way to boost the efficiency of your product team and ship with confidence? Check out this ebook to learn how Sentry's real-time error monitoring helps developers stay in their workflow to fix bugs before the user even knows there’s a problem.

node js ,express ,visual studio

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}