GithubHelp home page GithubHelp logo

Comments (7)

lcnvdl avatar lcnvdl commented on June 15, 2024 1

Thank you for your answer.

Out of curiosity, what operating system are you running?

Windows 11

The reasons why supervisor was chosen in the first place rather than nodemon were the following:

  • It has 0 dependencies (and sub-dependencies) which has many advantages like a smaller size of the node_modules directory, fewer trouble to deal with when a sub-dependency suddenly breaks things in a minor version, and fewer security vulnerabilities to patch.

I understand your reasons.

  • And, at the time, when installing nodemon, a message was displayed in the terminal asking users to donate money/sponsors to the project, which sort of "polluted" the installation output.

But perhaps this is something that no longer applies:

  • As you pointed out, supervisor seems no longer to be maintained, which could lead to problems in the future (unpatched vulnerabilities, new versions of Node not being supported).
  • Installation of nodemon no longer displays a "money message".
  • The output of npm run dev is more "beautiful" with nodemon.
  • And nodemon starts the project faster (based on what you said).

(I don't think popularity is a good criterion for choice though.)

An alternative, which I hope will work one day, would be to use the native node --watch function. Unfortunately, the --watch-path option doesn't work on Linux at the moment.

Moving to nodemon seems to be an interesting choice then, do you want to submit a PR?

Sure!

They are some stuff that should still work though:

  • when a file config file in JSON or YAML is changed, the server should restart,

Ok

  • when an error is thrown when the server start, the server should not be reloaded indefinitely,

Ok

  • doc examples with gRPC and GraphQL should be updated and still work.

Ok, I never tried that examples, but I will run them before and after the change, in order to get the same results.

from foal.

LoicPoullain avatar LoicPoullain commented on June 15, 2024

Which version of supervisor did you have in Foal 2 and in Foal 4?

Also, what was the command in package.json in Foal 2 and in Foal 4?

from foal.

lcnvdl avatar lcnvdl commented on June 15, 2024

Foal TS 2 command:

{
"develop": "npm run build && concurrently \"tsc -p tsconfig.app.json -w\" \"supervisor -w ./build,./config -e js,json,yml --no-restart-on error ./build/index.js\"",
}

Supervisor version:

{
"supervisor": "~0.12.0",
}

Note: I didn't realize that the only difference was the command, I thought they were different versions too

from foal.

lcnvdl avatar lcnvdl commented on June 15, 2024

I was researching. Supervisor not only is less popular than Nodemon, also, is not mantained:

image

image

Vs nodemon:

image

image

Maybe replacing Supervisor is a good idea.

If you want, I can send you a pull request.

from foal.

LoicPoullain avatar LoicPoullain commented on June 15, 2024

Out of curiosity, what operating system are you running?

The reasons why supervisor was chosen in the first place rather than nodemon were the following:

  • It has 0 dependencies (and sub-dependencies) which has many advantages like a smaller size of the node_modules directory, fewer trouble to deal with when a sub-dependency suddenly breaks things in a minor version, and fewer security vulnerabilities to patch.
  • And, at the time, when installing nodemon, a message was displayed in the terminal asking users to donate money/sponsors to the project, which sort of "polluted" the installation output.

But perhaps this is something that no longer applies:

  • As you pointed out, supervisor seems no longer to be maintained, which could lead to problems in the future (unpatched vulnerabilities, new versions of Node not being supported).
  • Installation of nodemon no longer displays a "money message".
  • The output of npm run dev is more "beautiful" with nodemon.
  • And nodemon starts the project faster (based on what you said).

(I don't think popularity is a good criterion for choice though.)

An alternative, which I hope will work one day, would be to use the native node --watch function. Unfortunately, the --watch-path option doesn't work on Linux at the moment.

Moving to nodemon seems to be an interesting choice then, do you want to submit a PR?

They are some stuff that should still work though:

  • when a file config file in JSON or YAML is changed, the server should restart,
  • when an error is thrown when the server start, the server should not be reloaded indefinitely,
  • doc examples with gRPC and GraphQL should be updated and still work.

from foal.

LoicPoullain avatar LoicPoullain commented on June 15, 2024

@lcnvdl if you take this one, I'd recommend to start with a completely new fork and "checkouts" your feature branch from v4-5-0. The dependency system has been updated in this branch and it will be easier to run npm install nodemon and npm uninstall supervisor in @foal/examples.

from foal.

lcnvdl avatar lcnvdl commented on June 15, 2024

I'd recommend to start with a completely new fork and "checkouts" your feature branch from

Sure! Thanks for the information

from foal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.