- to start the project:
if encouter error regarding typescript:
- (Ctrl+Shift+P or Command+Shift+P) and searching for "TypeScript: Restart TS Server."
-
Create a new directory:
mkdir ~/my_mongo_db
-
Run MongoDB with
--dbpath
(if you put db in Code/storalink_db): use absolute pathmongod --dbpath=./Code/storalink_db
-
After updating the path, run like this (if you put db in Code/storalink_db):
mongod --dbpath=./Code/storalink_db
Copy a MongoDB Atlas database to your local machine for testing, you can use the mongodump
and mongorestore
utilities. Here's how:
If you haven't installed the MongoDB command line tools, you can download them from the official MongoDB website.
- Log in to your MongoDB Atlas account.
- Navigate to your cluster dashboard.
- Click on the "CONNECT" button.
- Choose "Connect using MongoDB Compass" to get the connection string.
The connection string will look something like this:
mongodb+srv://<username>:<password>@cluster0.mongodb.net/<dbname>?retryWrites=true&w=majority
Open your terminal and run the following command:
mongodump --uri "mongodb+srv://<username>:<password>@cluster0.mongodb.net/<dbname>?retryWrites=true&w=majority" --out /path/to/output/folder
- this output folder is better not be in your desinated database folder, this is only a dump *
Replace <username>
, <password>
, <dbname>
, and /path/to/output/folder
with your actual MongoDB Atlas username, password, database name, and the folder where you want to store the dump.
After you've downloaded the database, you can restore it to your local MongoDB instance using the following command:
mongorestore --db database/path ./dump/path
mongod --dbpath=./Code/storalink_db
- beta testing (version 4)
- we will be employing https://tutorial.docusaurus.io/docs/intro for documentation soon