Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

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

Deploy code to production now. Release to users when ready. Learn how to separate code deployment from user-facing feature releases with LaunchDarkly.

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.

Deploy code to production now. Release to users when ready. Learn how to separate code deployment from user-facing feature releases with LaunchDarkly.

Topics:
node js ,express ,visual studio

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}