简体   繁体   中英

Publishing Node.js/Grunt website from my home machine

I have a site on node js and Grunt.

Son when in my terminal I run "grunt serve:dist" it publishes me the site on 127.0.0.1:9000

Now I want to publish this to the net, with no-ip.org

Here's what I did:

  • Opened ports on my router:

    9000 9000 TCP/IP 192.0.1.11

  • linking no-ip to my router

  • disabling mac firewall

but either I go on a browser and do xxx.xxx.xxx.xxx:9000 or mydomain.noip.me:9000 I don't see my website!

Make sure when you call listen(port, ip) in your code that you specify "0.0.0.0" as the IP, meaning "all IP addresses". If your code is listening bound to the 127.0.0.1 loopback IP address, it won't accept remote connections by definition.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM