

Open the package.json file and modify the scripts object as follows. npm install -save-dev a file in the root folder of the application with the below json. npm install -save-dev install -save-dev install -save-dev to install all dependencies in one command, run the below command. Run the below commands to install babel as a development dependency. env file to store environment variables as follows.īabel is a JavaScript compiler that is mainly used to convert ECMAScript2015+ code into a backwards compatible version of JavaScript in current and older browsers or environments. In the root folder of the project, create a. The expected result that is to be displayed in the console is 4.Īdd a breakpoint to line 3 in the server.js file. The result of the calculator will be outputted to the console. When the application is executed, a new calculator will be initialized and the add method will be invoked with two numbers, 1 and 3. Open the project in visual studio code and create an src folder with the following files.Īs can be seen from the above files, a simple calculator is created that adds two numbers. This article will present the steps required to get a simple node.js project running using es6+ features with debugging enabled in visual studio code.īefore proceeding with this article, ensure that you have node.js and visual studio code installed.Ĭreate a new project folder and navigate to it using a console or terminal. Two most common tools used to make these initial steps much more simpler are



