Questions on Manage Packages with npm


#1

Hey folks !

Just completed the tutorial on “Manage Packages with npm”, have a couple of follow up questions, hope some experts here can enlighten me. Here goes :

In the Login (Step 02) of how-to-npm, I ran "npm adduser"in my C9 environment to create an user without specifying registry. According to npm documentation, this => registry defaults to https://registry.npmjs.org/
However, I am seeing .npmrc in my C9 workspace has the registry set to http://localhost:15443/
I also noted the “how-to-npm” instruction has this

Because this is just a tutorial adventure, remember, we're not  
     *actually* creating an account anywhere.  However, when you run  
     this in the Real World, it'll create a real account, with a page  
     on npmjs.com and the ability to publish packages that real live  
     humans can install and enjoy.

Q1 - how do I run “npm adduser” in real world to create a real account with a page on npmjs.com ? What caused the registry in the tutorial to set to http://localhost:15443/ ?

In the Publish (Step 08) of “how-to-npm”, when I ran the command "npm view " without first checking the relevant files of the package into github. I got the following error -

npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! syscall connect
npm ERR! Error: connect ECONNREFUSED 127.0.0.1:15443
npm ERR!     at Object.exports._errnoException (util.js:907:11)
npm ERR!     at exports._exceptionWithHostPort (util.js:930:20)
npm ERR!     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1077:14)
npm ERR!  { [Error: connect ECONNREFUSED 127.0.0.1:15443]
npm ERR!   stack: 'Error: connect ECONNREFUSED 127.0.0.1:15443\n    at Object.exports._errnoException (util.js:907:11)\n    at exports._exceptionWithHostPort (util.js:930:20)\n    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1077:14)',
npm ERR!   code: 'ECONNREFUSED',
npm ERR!   errno: 'ECONNREFUSED',
npm ERR!   syscall: 'connect',
npm ERR!   address: '127.0.0.1',
npm ERR!   port: 15443 }
npm ERR! 
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly.  See: 'npm help config'

Q2 - From the debug log, I know the error was caused by the registry set to http://localhost:15443/ , I checked port 15443 is listening, why did I get connection refused and how do I get around this error ?

audt:~/workspace (master) $ netstat -na |grep 15443
tcp6       0      0 :::15443                :::*                    LISTEN  

Thanks !

p.s. - after I checked in all the relevant files of the package to github, the "npm view " command ran fine.