Where would I enter variables like a connection string in a nitro app?
I'd like to have one place that I can store it and access anywhere in
the app. Is there an acceptable way to use a web.xml file and read
from it? Or would I it go in a jackconfig or narwhal.conf file? I've
had trouble figuring out which type of things should be tracked by
nitro vs. jack vs. narwhal
I've seen appenginejs apps using web.xml. How would I use it in Nitro?
I was looking at Apache Shiro for authentication and I was thinking
about how I would wire that in. Their docs give examples using the
web.xml.
Thanks
--
You received this message because you are subscribed to the Google Groups "nitro-devel" group.
To post to this group, send email to nitro...@googlegroups.com.
To unsubscribe from this group, send email to nitro-devel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nitro-devel?hl=en.
{"myConnectionString": "testString"}
then I modified the hello.js page from the example to this:
var myConnectionString = require("settings").myConnectionString;
exports.GET = function(env) {
return { body: [myConnectionString] };
}
but I keep getting this result on the page
TypeError: Cannot call method "toByteString" of undefined
I turned on debugging and I noticed that pkg[undefined] gets printed
out a lot in the USING and REQUIRED statements. For example:
REQUIRE: id[settings] baseId[C:/Users/Pete/Documents/Downloads/narwhal/
packages/nitro/example/src/root/hello] pkg[undefined]
basePkg[undefined]
USING: id[settings] pkg[undefined]
\\ settings
REQUIRE: id[packages] baseId[settings] pkg[undefined]
basePkg[undefined]
USING: id[packages] pkg[undefined]
\\\ packages
REQUIRE: id[./system] baseId[packages] pkg[undefined]
basePkg[undefined]
USING: id[system] pkg[undefined]
On Mar 18, 10:36 pm, Dean Landolt <d...@deanlandolt.com> wrote:
> Check out the "settings" module inhttp://github.com/kriszyp/commonjs-utils--does a nice job of managing
> this for you (using a local.json file in your
> project) and you just require("settings").myConnectionString
>
>
>
> On Thu, Mar 18, 2010 at 9:30 PM, pnewhook <peter.newh...@gmail.com> wrote:
> > Hello,
>
> > Where would I enter variables like a connection string in a nitro app?
> > I'd like to have one place that I can store it and access anywhere in
> > the app. Is there an acceptable way to use a web.xml file and read
> > from it? Or would I it go in a jackconfig or narwhal.conf file? I've
> > had trouble figuring out which type of things should be tracked by
> > nitro vs. jack vs. narwhal
>
> > I've seen appenginejs apps using web.xml. How would I use it in Nitro?
> > I was looking at Apache Shiro for authentication and I was thinking
> > about how I would wire that in. Their docs give examples using the
> > web.xml.
>
> > Thanks
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "nitro-devel" group.
> > To post to this group, send email to nitro...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > nitro-devel...@googlegroups.com<nitro-devel%2Bunsubscribe@googlegr oups.com>
--
You received this message because you are subscribed to the Google Groups "nitro-devel" group.
To post to this group, send email to nitro...@googlegroups.com.
To unsubscribe from this group, send email to nitro-devel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nitro-devel?hl=en.
That is normal if you are not using using-packages in your program.
Christoph