Node.js Workflow essentials (for Arch-Based Distros)

NSerus
2 min readMar 20, 2021

--

Hey Guys,

  • Don’t you hate having to have to write node <fileName>.js everytime you want to execute your file?
  • What about saving the file on your editor ? That’s also pretty annoying.

Let me change your world in this quick tutorial where we will be installing/activating some tools to improve your workflow for coding in Node.js.

Visual Studio Code

This beautiful tool not only is beautiful but it is also very customizable, and very easy to install, just go to your terminal and use your favourite repository to install it:

sudo pacman -S code

So as this is only a quick tutorial i will only show the best tool in this text editor (and probably many more editors have this), that is the Auto-Save feature that, you guessed it, it auto-saves. Just go to files and check Auto-Save like in the following image to activate

Now this functionality will get a lot better with the next tool, that is…

Nodemon

Remember having to run in the terminal node <fileName>.js all the time? With this you will have to only run only one command in your session, basically it auto-restarts the Node server every time that it notices a change on the file.

For installation you first need to install npm, a JavaScript package manager, with:

sudo pacman -S npm

And to install Nodemon use npm:

sudo npm install -g nodemon

After that you only need to run your .js files with nodemon instead of node like this:

And now your coding sessions should be a little faster and less annoying than before.

Have a Nice Day.

--

--

NSerus
NSerus

Written by NSerus

A Computer Science Student

No responses yet