Skip to content

Instantly share code, notes, and snippets.

@Ayon-SSP
Created March 13, 2023 16:18
Show Gist options
  • Save Ayon-SSP/c579d48727eaffd54aeb1c968309ca43 to your computer and use it in GitHub Desktop.
Save Ayon-SSP/c579d48727eaffd54aeb1c968309ca43 to your computer and use it in GitHub Desktop.

🚀 Node.js-Setup

image This readme will guide you through the process of installing Node.js and setting up a Node.js development environment using Visual Studio Code.

Prerequisites

Before you begin, ensure that you have the following software installed:

  • Node.js (version 12 or higher)
  • Visual Studio Code

Installing Node.js

To install Node.js, follow these steps:

  1. Go to the official Node.js website.
  2. Download the appropriate installer for your operating system.
  3. Run the installer and follow the installation instructions.

Setting up a Node.js development environment with Visual Studio Code

To set up a Node.js development environment with Visual Studio Code, follow these steps:

  1. Open Visual Studio Code.

  2. Click on the Extensions icon in the Activity Bar on the side of the screen (or press Ctrl+Shift+X).

  3. Search for and install the "Node.js Extension Pack" extension.

  4. Press Ctrl+Shift+P to open the Command Palette.

  5. Type "Terminal: Create New Integrated Terminal" and select it to open a new terminal window.

  6. In the terminal window, type node -v to verify that Node.js is installed.

  7. Create a new folder for your project and open it in Visual Studio Code.

  8. Create a new file named app.js in your project folder.

  9. Add the following code to app.js:

    console.log("Hello, World!");
  10. Save the file.

  11. Open the terminal window in Visual Studio Code by clicking on the Terminal tab in the bottom panel of the screen.

  12. Type node app.js in the terminal window and press Enter to run the code.

  13. You should see the message "Hello, World!" displayed in the terminal window. Congratulations! You have successfully installed Node.js and set up a Node.js development environment with Visual Studio Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment