Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Need help creating mongodb database for wexstream.
Kindly give steps.

What I have tried:

I have tried creating but no success.
Posted

Here is a sample I have used for testing in Mongo.

This creates a simple database with a few book entries:
JavaScript
// simple script to create a Mongo database
db = connect("library")
db.books.insertMany([
    {
        title: "The Last of the Mohicans",
        author: { forenames: "J Fenimore", surname: "Cooper" },
        genre: "Fiction",
        quality: 5
    },
    {
        title: "The Lord of the Rings",
        author: { forenames: "JRR", surname: "Tolkien" },
        genre: "Fiction",
        quality: 5
    },
    {
        title: "A la Recherche du Temps Perdu",
        author: { forenames: "Marcel", surname: "Proust" },
        genre: "Biography",
        quality: 5
    },
    {
        title: "Parade's End",
        author: { forenames: "Ford Maddox", surname: "Ford" },
        genre: "Fiction",
        quality: 5
    },
    {
        title: "The Good Soldier",
        author: { forenames: "Ford Maddox", surname: "Ford" },
        genre: "Fiction",
        quality: 5
    },
    {
        title: "The Moon's a Balloon",
        author: { forenames: "David", surname: "Niven" },
        genre: "Biography",
        quality: 5
    }
])


The first thing you need is to create a library folder and start the Mongo server. NB you must do this in a separate process.
mkdir library
C:\Program Files\MongoDB\Server\5.0\bin\mongod --dbpath library



You can then execute the above script by the following commands:
C:\Program Files\MongoDB\Server\5.0\bin\mongo 
use library           // the name of the database
load("scriptname") // the name of the script provided above
 
Share this answer
 
This is far, far too general a question for us to even begin to answer - we don't even have any idea where you are stuck, or what help you might need - and that's kinda important, don't you think?

But a trivial Google will get you started: creating mongodb database for wexstream - Google Search[^] - it includes info on creating a Mongo DB, and interfacing it with Wexstream.

Start there, and see how far you can get on your own - and if you need more help, try to be precise about what help you actually need: remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with - we get no other context for your project.
Imagine this: you go for a drive in the country, but you have a problem with the car. You call the garage, say "it broke" and turn off your phone. How long will you be waiting before the garage arrives with the right bits and tools to fix the car given they don't know what make or model it is, who you are, what happened when it all went wrong, or even where you are?

That's what you've done here. So stop typing as little as possible and try explaining things to people who have no way to access your project!

This may help you ned time: Asking questions is a skill[^] and think about what you need to know, and what you need to tell us in order to get help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900