

One of the main reasons programmers love Visual Studio Code is that you can build anything or use (almost) any programming language with it. Step-5: Install extension packages on VSC You can split the screen by dragging one file to the top-right active corner of another. You can enlarge the font size by pressing the ctrl and + keys simultaneously or minimize it using the ctrl and - keys. You probably wonder how I condensed the font size to accommodate more things or split the screen to accommodate the two files. It attempts to autocomplete statements for us. You must have realized that visual studio code is intelligent enough to detect we are writing JavaScript. You can end a process running on the terminal using the ctrl+c shortcut. Then make a request using your browser as the client on PORT 3000. Let's customize the package.json file to use nodemon, build the web server and start it. Let's install the following packages using the Terminal.īefore that, let's notify Node.js that we want to manage npm packages by running npm init command. Step-4: Install additional packages on VSC So, it would be best to replace every ctrl instance with the command if the given visual studio code shortcut fails to work in Mac.ĪLSO READ: How to use Node.js with Sublime Text IDE Note: command for Mac is the equivalence of the ctrl key for Windows and Linux. You can use the main navigation links or shortcuts: ctrl+~ or ctrl+j There are many ways to toggle the Terminal. And run it with Visual Studio Code's Terminal. console.log('How to use Node.js with visual studio code') Let's create the file using the first menu's link. The third link refreshes the screen, while the last one collapses all the (sidebar) opened files and folders. The first link creates a file, while the second one creates a folder. A menu pops on the right side of the folder name.

Head over to your Terminal, create a folder, and then open it with Visual Studio Code. Let's create a file called server.js inside the test folder, then open it with Visual Studio Code. Besides, you can click the File tab on the navigation menu, followed by New File.
