DEV Community

Leonid Rezvitsky
Leonid Rezvitsky

Posted on

1

Nodemon + Go App

Nodemon + Go


Background

Hey! When developing an application in the go language, it is necessary to restart it every time through the console in order to apply new changes, this is not convenient. I propose to sprinkle it. I will be using the npm nodemon package.

Start πŸš€

Install nodemon globally

npm install -g nodemon
Enter fullscreen mode Exit fullscreen mode

For easy launch of the application, I will create a Makefile.

run: main.go
    nodemon --exec "go run" main.go
Enter fullscreen mode Exit fullscreen mode

Here to nodemon we pass the launch parameters and the application itself.

To run the application

make run
Enter fullscreen mode Exit fullscreen mode

Example: https://github.com/Rezvitsky/nodemon-golang-example

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free β†’

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay