Automatic Reloading in Go(Nodemon)

Automatically restarting the server always help to us increase our efficiency, That is the reason we can do our job faster via automation so in this article we will learn how to restart the go-lang project,

There is multiple ways to restart the go-lang server after saving the file, but i will talk here one of the best process manager Nodemon, Yes nodemon is not only for JS project via nodemon you can restart any of the projects by making use of the --exec flag.

I am assuming you have already installed Nodemon in your system.

Now, we can run the web server using Nodemon by running the following command:

After changing some code then save.

If you want to configure Nodemon, create the configuration file nodemon.json in the project’s root directory. A full sample config file is available here.

That’s it for this time! I hope you enjoyed this post. As always, I welcome questions, notes, comments and requests for posts on topics you’d like to read. See you next time! Happy Coding !!!!!

--

--

I’m a MERN Developer. ( Redux | AWS | Python ) I enjoy taking on new things, building skills, and sharing what I’ve learned.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ankit Kumar Rajpoot

I’m a MERN Developer. ( Redux | AWS | Python ) I enjoy taking on new things, building skills, and sharing what I’ve learned.