0

My VPN is occupying port 9000, so I have to use another one for my local dev server based on Grunt. Thus - I have provided a port in Gruntfile.js - like so:

grunt.initConfig({
  connect: {
    server: {
      options: {
        port: grunt.option('port') || 9000,
        ...

And when I run the dev server with npm run start --port=9009 - at the end of the terminal it says:

Running "connect:server" (connect) task
Started connect web server on http://localhost:9000

=====

If I hardcode the port in Gruntfile.js - then it works, but I want to be able to provide the port as a parameter - other colleagues do not have problem with ports so I want them to continue start the project as before.

Any idea what is the problem?

pesho hristov
  • 1,946
  • 1
  • 25
  • 43

0 Answers0