hmmmm I'll look into this "user" business...

On Tuesday, April 8, 2014 8:20:32 PM UTC-4, Jose Luis Rivas wrote:
>
> Where's "user"? 
>
> You have to write and declare "user" before using it. It has nothing to 
> do with mongodb, at all. 
>
> You have to write the method "list" inside user too before trying to tie 
> something to that method. 
>
> On 4/8/14, 7:10 PM, Frank Z wrote: 
> > I installed mongodb through my unbuntu terminal after installing 
> node.js. 
> > 
> > When I run |sudo| |service mongodb start| 
> > | 
> > | 
> > |I get back "|start: Job is already running: mongodb" from the terminal 
> > 
> > So my assumption is that everything is running properly here... 
> > 
> > I'm trying to make this todo list from an example in my book, using 
> > express.js. I used the package.json file to install the depenencies: 
> > 
> > { 
> >   "name": "application-name", 
> >   "version": "0.0.1", 
> >   "private": true, 
> >   "scripts": { 
> >     "start": "node app.js" 
> >   }, 
> >   "dependencies": { 
> >     "express": "3.5.1", 
> >     "jade": "*", 
> >     "mongoose":"3.8.4" 
> >   } 
> > } 
> > 
> > Then I run npm install in my terminal... 
> > 
> > Everything is correct in my app.js file, all the variables declared 
> > properly with mongoose and everything... 
> > 
> > I run node app.js and get back: 
> > 
> > /home/frankz/Desktop/nodesandbox/connect_to_mongo/app.js:40 
> > app.get('/users', user.list); 
> >                   ^ 
> > ReferenceError: user is not defined 
> >     at Object.<anonymous> 
> > (/home/frankz/Desktop/nodesandbox/connect_to_mongo/app.js:40:19) 
> >     at Module._compile (module.js:456:26) 
> >     at Object.Module._extensions..js (module.js:474:10) 
> >     at Module.load (module.js:356:32) 
> >     at Function.Module._load (module.js:312:12) 
> >     at Function.Module.runMain (module.js:497:10) 
> >     at startup (node.js:119:16) 
> >     at node.js:902:3 
> > 
> > So what's going on here? 
> > 
> > -- 
> > -- 
> > 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 [email protected]<javascript:> 
> > To unsubscribe from this group, send email to 
> > [email protected] <javascript:> 
> > For more options, visit this group at 
> > http://groups.google.com/group/nodejs?hl=en?hl=en 
> > 
> > --- 
> > You received this message because you are subscribed to the Google 
> > Groups "nodejs" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to [email protected] <javascript:> 
> > <mailto:[email protected] <javascript:>>. 
> > For more options, visit https://groups.google.com/d/optout. 
>
> -- 
> Jose Luis Rivas - http://joseluisrivas.net 
> Venezuela - GPG: 0xB9AC8C43 
>

-- 
-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to