【发布时间】:2018-01-25 20:46:39
【问题描述】:
好的,我已经为此搜索了几个小时,没有任何东西可以正常工作,所以我必须做错事。它在 localhost:port 上工作正常,但我无法让它远程工作。
这里是 app.js
var http = require('http');
var express = require('express');
var app = express();
app.set('view engine', 'jade');
app.set('views', './views');
app.get('/', function(req, res) {
res.render('index', {title: 'Welcome', message: 'Hello ExpressJS!'});
});
app.listen(3000);
console.log('Running Express...');
这是我的端口转发配置:
Name: HTTP
Service Type: TCP
External Starting Port: 80
External Ending Port: 80
Use the same port range for Internal Port: [Checked]
Internal IP Address: 192.168.1.11 (This is the pc I want to use)
DNS 配置
Name: Blank Type: A TTL: 300 Target: My Ip Address
Name: WWW Type: A TTL: 300 Target: My Ip Address
如果我使用 www.mydomain.com 我什么也得不到,如果我使用我的 IP 地址仍然什么都没有。
我该如何解决这个问题?
【问题讨论】: