2 Replies - 632 Views - Last Post: 23 March 2013 - 03:38 AM Rate Topic: -----

#1 demoninator  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 22-March 13

MongoDB + NodeJS help

Posted 22 March 2013 - 10:36 AM

I'm a total noob, so can someone please help me out? lol

I'm doing this on windows
I hosted my site using Node.js

I have a server.js file, which put my entire directory on localhost:3000

var connect = require('connect');
connect.createServer(
    connect.static(__dirname)
).listen(3000);


than i got an index.html page (localhost:3000)

<html>
<head></head>
<body>
<form action="calender.html">
        
        <div>
        <label for="fname">First Name</label>
        <input type="text" name="fname" required>
        <label for="lname">Last Name</label>
        <input type="text" name="lname" required>
        </div>
                
        <div>
        <label for="email">Email</label>
        <input type="text" iname="email" required>
        </div>
                
        <div>
        <label for="password">Password</label>
        <input type="password" "name="Password" size="32" required>
        </div>

       <h1>
       <button type="submit">Submit</button>
       </h1>
       
       </form>
       </div>
</body>



i got MongDB installed on my windows, i was able to start up the Mongod.exe and run my commands to create database files n such using the shell. I have the correct drivers installed in my nodejs as well [npm install mongodb]

i can successfully create database files using my server.js file, but I want to be able to do that in my index.html file so that when the user clicks on registration button the account information gets saved in the database.

can someone please help me with this? also im trying to avoid sleepy mongoose because i dont want to use python.

thanks

Is This A Good Question/Topic? 0
  • +

Replies To: MongoDB + NodeJS help

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3397
  • View blog
  • Posts: 9,607
  • Joined: 08-June 10

Re: MongoDB + NodeJS help

Posted 23 March 2013 - 01:45 AM

View Postdemoninator, on 22 March 2013 - 06:36 PM, said:

can someone please help me with this? also im trying to avoid sleepy mongoose because i dont want to use python.

I donít see why you need Python when you want to use mongoose ... what I have seen still uses JS. (overview over MongoDB interfaces)
Was This Post Helpful? 0
  • +
  • -

#3 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 5957
  • View blog
  • Posts: 23,226
  • Joined: 23-August 08

Re: MongoDB + NodeJS help

Posted 23 March 2013 - 03:38 AM

Perhaps you should read the manual?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1