Message from discussion
"include" functionality?
Received: by 10.227.128.145 with SMTP id k17mr459302wbs.23.1280140153121;
Mon, 26 Jul 2010 03:29:13 -0700 (PDT)
X-BeenThere: express-js@googlegroups.com
Received: by 10.227.92.203 with SMTP id s11ls1358700wbm.1.p; Mon, 26 Jul 2010
03:29:12 -0700 (PDT)
Received: by 10.227.69.76 with SMTP id y12mr457036wbi.26.1280140151979;
Mon, 26 Jul 2010 03:29:11 -0700 (PDT)
Received: by 10.227.69.76 with SMTP id y12mr457035wbi.26.1280140151925;
Mon, 26 Jul 2010 03:29:11 -0700 (PDT)
Return-Path: <sam.mill...@gmail.com>
Received: from mail-wy0-f177.google.com (mail-wy0-f177.google.com [74.125.82.177])
by gmr-mx.google.com with ESMTP id o41si1297271weq.12.2010.07.26.03.29.10;
Mon, 26 Jul 2010 03:29:10 -0700 (PDT)
Received-SPF: pass (google.com: domain of sam.mill...@gmail.com designates 74.125.82.177 as permitted sender) client-ip=74.125.82.177;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of sam.mill...@gmail.com designates 74.125.82.177 as permitted sender) smtp.mail=sam.mill...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by wyb35 with SMTP id 35so1986429wyb.8
for <express-js@googlegroups.com>; Mon, 26 Jul 2010 03:29:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:mime-version:received:sender:received
:in-reply-to:references:date:x-google-sender-auth:message-id:subject
:from:to:content-type;
bh=JpljAOHDesCMJTP68B0ZWbUKqeg1zBPTdgIEjy5htBM=;
b=ml8oW1wrcddnY7TmCAoElO0asA1CItDdrpl4vDt5rf6QW2/lCg21kHq9ubnoSqbYIm
8mKDYd1jv+f3BdUFfsAKlhrdORdGQmJNWvlYqQxGznvZFC6XmqycbScxwON8hV44OjF1
oNtJfRkjk7N1V9P57aUDF4TLt40SrGuo13ugU=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=mime-version:sender:in-reply-to:references:date
:x-google-sender-auth:message-id:subject:from:to:content-type;
b=AhdhWie5mA4HPOy1Xkurabnn67kfF1i6FLz3PtK/810oZFV6bjz8CcPHc44GOZgC/c
WeFAu4U873k/sy6UY1JzYdJsJfVxs4EqBUKUGKvg7kjDwNAHCu8UctzjeqzV4aUGKNEr
k2Klv5N6NIwKvAsdLqiCfsaiX4YOga0UhuL9c=
MIME-Version: 1.0
Received: by 10.227.157.133 with SMTP id b5mr1699019wbx.212.1280140150567;
Mon, 26 Jul 2010 03:29:10 -0700 (PDT)
Sender: sam.mill...@gmail.com
Received: by 10.227.144.73 with HTTP; Mon, 26 Jul 2010 03:29:10 -0700 (PDT)
In-Reply-To: <AANLkTi=6ZsnWoG0kwekKGvNx37EOqvntd2H2Cx6P+...@mail.gmail.com>
References: <AANLkTi=6ZsnWoG0kwekKGvNx37EOqvntd2H2Cx6P+...@mail.gmail.com>
Date: Mon, 26 Jul 2010 11:29:10 +0100
Message-ID: <AANLkTikyPTFUQDR=9PCTRYE8yvsEJbW9hCjbYODys...@mail.gmail.com>
Subject: Re: "include" functionality?
From: Sam Millman <smill...@nhbs.co.uk>
To: express-js@googlegroups.com
Content-Type: multipart/alternative; boundary=0016364181d1effb59048c47dad7
--0016364181d1effb59048c47dad7
Content-Type: text/plain; charset=ISO-8859-1
you mean:
require("sys");
or:
require("./mongod/somecheeseyclassthatIwantincluded")
In turn this allows you to propogate a class. Is this what you mean or do
you meant the php include where it acts as a part of the file?
so:
require("sys") would mean the code of that file is placed into the current
document allowing the code to be manipulated as if it wasnt in a different
file?
On 26 July 2010 09:54, Jeffrey 'jf' Lim <jfs.wo...@gmail.com> wrote:
> Anybody wondered about this? I come from a sinatra background :), and
> I very much like the ability to be able to arbitrarily split off
> related functionality/code into different files (eg. I want to split
> off the "app.get('/user/xxx', ...)" stuff into another file, say
> users.js). In sinatra, you could do this with a 'require'.
> Unfortunately, this doesnt seem possible with node/expressjs. Or is
> there something i'm missing? Does anybody miss/want this
> functionality?
>
> -jf
>
> --
> "Every nonfree program has a lord, a master --
> and if you use the program, he is your master."
> --Richard Stallman
>
> "It's so hard to write a graphics driver that open-sourcing it would not
> help."
> -- Andrew Fear, Software Product Manager, NVIDIA Corporation
> http://kerneltrap.org/node/7228
>
> --
> You received this message because you are subscribed to the Google Groups
> "Express" group.
> To post to this group, send email to express-js@googlegroups.com.
> To unsubscribe from this group, send email to
> express-js+unsubscribe@googlegroups.com<express-js%2Bunsubscribe@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/express-js?hl=en.
>
>
--
Bow Chicka Bow Wow
--0016364181d1effb59048c47dad7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
you mean:<div><br></div><div>require("sys");</div><div><br></div>=
<div>or:</div><div><br></div><div>require("./mongod/somecheeseyclassth=
atIwantincluded")</div><div><br></div><div>In turn this allows you to =
propogate a class. Is this what you mean or do you meant the php include wh=
ere it acts as a part of the file?</div>
<div><br></div><div>so:</div><div><br></div><div>require("sys") w=
ould mean the code of that file is placed into the current document allowin=
g the code to be manipulated as if it wasnt in a different file?</div><div>
<br><div class=3D"gmail_quote">On 26 July 2010 09:54, Jeffrey 'jf' =
Lim <span dir=3D"ltr"><<a href=3D"mailto:jfs.wo...@gmail.com">jfs.world@=
gmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Anybody wondered about this? I come from a sinatra background :), and<br>
I very much like the ability to be able to arbitrarily split off<br>
related functionality/code into different files (eg. I want to split<br>
off the "app.get('/user/xxx', ...)" stuff into another fi=
le, say<br>
users.js). In sinatra, you could do this with a 'require'.<br>
Unfortunately, this doesnt seem possible with node/expressjs. Or is<br>
there something i'm missing? Does anybody miss/want this<br>
functionality?<br>
<br>
-jf<br>
<br>
--<br>
"Every nonfree program has a lord, a master --<br>
and if you use the program, he is your master."<br>
=A0 =A0 --Richard Stallman<br>
<br>
"It's so hard to write a graphics driver that open-sourcing it wou=
ld not help."<br>
=A0 =A0 -- Andrew Fear, Software Product Manager, NVIDIA Corporation<br>
<a href=3D"http://kerneltrap.org/node/7228" target=3D"_blank">http://kernel=
trap.org/node/7228</a><br>
<font color=3D"#888888"><br>
--<br>
You received this message because you are subscribed to the Google Groups &=
quot;Express" group.<br>
To post to this group, send email to <a href=3D"mailto:express-js@googlegro=
ups.com">express-js@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a href=3D"mailto:express-js%=
2Bunsubscribe@googlegroups.com">express-js+unsubscribe@googlegroups.com</a>=
.<br>
For more options, visit this group at <a href=3D"http://groups.google.com/g=
roup/express-js?hl=3Den" target=3D"_blank">http://groups.google.com/group/e=
xpress-js?hl=3Den</a>.<br>
<br>
</font></blockquote></div><br><br clear=3D"all"><br>-- <br>Bow Chicka Bow W=
ow<br>
</div>
--0016364181d1effb59048c47dad7--