TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Change http://localhost:3000 to myapp.dev with marathon-dns

8 点作者 davewasmer大约 12 年前

6 条评论

brandon_wirtz大约 12 年前
I do this with Squid, or Fiddler depending on platform.<p>I have done a similar trick for the entire lan by doing port forwarding on DD-WRT and similar.<p>I pretty routinely highjack ports as domains for doing local testing. If I want to make sure that I'm hitting my own cached version of an API that I need to consume from a third party I just serve it from local. That way I can dev offline, or guarantee that I will always get the same response, or a much faster response. I could Mock it, or do a number of other things, but it is often nice to be able to see what is going over the wire, and using a proxy to handle the redirect and port change is one of the best ways to do so.
jstanley大约 12 年前
Or with /etc/hosts<p>EDIT: Oops. Didn't notice the port number part.
t0大约 12 年前
Is this just a proxy? It seems like this script accepts packets and forwards them on to localhost.
评论 #5659531 未加载
ansman大约 12 年前
The readme is very unclear, I've installed it but it doesn't appear that it's doing anything.
fn大约 12 年前
I do this with Vagrant and the vagrant-hostmaster gem.
sebcioz大约 12 年前
What about subdomains? Does it support them?