Redirection service for the Node.js community

118 views
Skip to first unread message

Andrew Chilton

unread,
Sep 13, 2012, 3:50:54 PM9/13/12
to nod...@googlegroups.com
Hi everyone,

I made a little redirect service for myself (usually just to redirect
www->non-www or the other way around) and thought it could be useful
for everyone. It's on Nodejitsu - which I thank them for - so give me
a pull request [1] with your domain info and I'll get your redirects
up usually within a day or so (I'll batch them to save myself some
time). Instructions on the site:

* http://redirects.jit.su/
* https://github.com/appsattic/redirects

Thanks to Nodejitsu for the service and for confirming to me that I
can map as many domains as I like to the same application.

Hope the service can be useful for you.

Cheers,
Andy

[1] Has to be a pull request since the domain will need to be in the
config file when deployed. Read the site for more details.

--
Andrew Chilton
e: chi...@appsattic.com
w: http://appsattic.com/
t: https://twitter.com/andychilton

Nathan Rajlich

unread,
Sep 14, 2012, 11:20:20 AM9/14/12
to nod...@googlegroups.com
Hey this is pretty cool! Had this been around a couple weeks ago I
probably would have used this instead of writing
https://github.com/TooTallNate/tootallnate.net/blob/master/server.js

Cheers!
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

Christian Tellnes

unread,
Sep 14, 2012, 11:32:45 AM9/14/12
to nod...@googlegroups.com
I took it a little step further a few months ago. Instead of having to
configure the application to the domain is forwarded, I create a TXT
record in DNS.

https://github.com/tellnes/dhfr



2012/9/14 Nathan Rajlich <nat...@tootallnate.net>:

Andrew Chilton

unread,
Sep 15, 2012, 2:28:51 AM9/15/12
to nod...@googlegroups.com
Hey guys,

Thanks for the info. @Christian, that looks pretty cool. To be honest,
I could and should have done something like that, except since it's
hosted on Nodejitsu it needs to know which domains route to which apps
- therefore they need to be added in package.json. Apparently they are
looking at an API which can add domains, so once they've released
that, I'll make it a lot easier to add your own.

@Nathan: yeah, I used to have redirects in Apache, Lighttpd, Nginx and
sometimes Connect middlware to do them for me (depending on where my
sites were hosted) but I got tired of doing all that and just wanted
an easy solution. :) And one less thing to monitor!

Cheers,
Andy
p: +64 21 891 681

henry.oswald

unread,
Sep 15, 2012, 8:24:26 PM9/15/12
to nod...@googlegroups.com
Yes the comment is a bit off. However please remember what we and JS owe him from opening his mouth in the past. Attacking his age or past is uncalled for.

Andrew Chilton

unread,
Sep 15, 2012, 10:02:30 PM9/15/12
to nod...@googlegroups.com
Hi Phil,

On 16 September 2012 01:24, UnclePhil <koeni...@gmail.com> wrote:
> I write "rewriter" one year ago (but i push it to git today)
> https://github.com/UnclePhil/rewriter.git

Is this hosted anywhere that other people can use? The main point of
my service is not to solve how to do redirection (it's a pretty simple
solution), but to host redirection for other people who don't want to.

> It's in heavy production in a big web farm with more than 700 rewriting
> rules, and i never stopped the server

Sounds great. This is what Node.js is all about.

> Personally i prefer a config file in place of hardcoded rules.

Snap. All config is in redirects.js. This could have been a JSON file,
except I wanted to add comments into it so that people can see what
they need to do. :)

Cheers,
Andy

UnclePhil

unread,
Sep 16, 2012, 5:15:13 AM9/16/12
to nodejs
Nope, this is not a cloud service

Even if the sites are public, the service is (only) private and hosted
in a governemental data center
But this is my code an i offer it to the community
That's my way of work

But with a little bit coding, we can transform it in a cloud service
But you need also to maintain the ad-hoc Ddns


Ph koenig
Aka UnclePhil

On 16 sep, 04:02, Andrew Chilton <chi...@appsattic.com> wrote:
> Hi Phil,
>

Tom

unread,
Sep 18, 2012, 4:25:26 PM9/18/12
to nod...@googlegroups.com
I've deployed a few very small scale websites all on one IP/VPS (right
now) using https://github.com/substack/mountie and adding a rule for
rerouting www was a breeze;

https://gist.github.com/49229e16fbe5c23d1e45
Reply all
Reply to author
Forward
0 new messages