Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6129617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:45:49+00:00 2026-05-23T16:45:49+00:00

How would you implement an asynch mongodb using vistax64/cygwin/node.js from scratch which resembles the

  • 0

How would you implement an asynch mongodb using vistax64/cygwin/node.js from scratch which resembles the original shell?

When I try tutorials, I get things all very similar too:

admin@RainComputer ~/nodeProjects
$ node dbtest.js
mongo://localhost:27017: Error: EPERM, Operation not permitted
Finished scanning... primary? no
undefined
mongo://localhost:27017: Disconnected

I just need any advice to install from scratch (just node and npm) a mongodb driver, preferably without using network functions, and close to the original shell.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:45:50+00:00Added an answer on May 23, 2026 at 4:45 pm

    I got this working by doing the following:

    • In cygwin: Install Node and npm
      (node package manager) and install
      ExpressJS, Jade and whatever else
      you’d like.
    • In Windows: download
      and install mongoDB. Start it running
      with “mongod” and note the port it
      listens on. Then test from the
      console using “mongo”. All should
      work within windows before trying
      from Cygwin.
    • In cygwin: Install a
      mongo driver using “npm install
      mongodb”
    • from your javascript
      code, connect to the DB:

      var Db = require('../node_modules/mongodb/lib/mongodb').Db, Server = require('../node_modules/mongodb/lib/mongodb').Server,
        ObjectID= require('../node_modules/mongodb/lib/mongodb/bson/bson').ObjectID;
      
      ...
      
      this.db= new Db('my-db-name', new Server("127.0.0.1", <your port here>, {auto_reconnect: true}, {} ));
        this.db.open( function(err, db) { 
              sys.puts("Error : " + err ) ;
          }
      

    If you get no errors, check in the mongo console with “show dbs” you should see a new DB named “my-db-name” in there. One more thing: run cygwin “as administrator” in windows, I’m not sure if it matters but just in case.

    Hope that helps,
    -fs

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How would I implement a binary search using just an array?
On which technological basis would you implement a multimedia app, which has to meet
I need to read from NetworkStream which would send data randomly and the size
Recently I've been thinking about finite state machines (FSMs), and how I would implement
How would you implement a system with the following objectives: Manage authentication, authorization for
When would I implement IDispose on a class as opposed to a destructor? I
How would you implement a Plugin-system for your Java application? Is it possible to
How would you implement a capacity-limited, generic MruList in C# or Java? I want
How would you implement paging in a LINQ query? Actually for the time being,
Possible Duplicates: How would I implement stackoverflow’s hovering dialogs? i want a small box

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.