Skip to content

Commit 8ddb824

Browse files
committed
readme mongo insruction
1 parent 88525e8 commit 8ddb824

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,37 @@ to run production app version
3838

3939
## MongoDb
4040

41-
[Instruction for Windows](./installMongo/Windows/Readme.txt)
41+
Local `mongoUri` will be `"mongodb://localhost:27017/mydb"`
4242

43-
[Instruction for Ubuntu](./installMongo/Ubuntu/Readme.txt)
43+
### Mongo installation on Windows 10
44+
45+
1. Download and install MongoDb server from [www.mongodb.com/try/download/community](https://www.mongodb.com/try/download/community) (set it on "D:\Program Files\" to not edit the .bat file)
46+
47+
2. Edit [mongo_win_install.bat](./installMongo/Windows/mongo_win_install.bat) file and fix next variables (dont use spaces around "="):
48+
- set `MongoDb_ExePath` - path to mongod.exe
49+
- set `MongoDb_DataFolderPath` - path to db folder
50+
51+
3. To start Mongo database
52+
- run `mongo_win_install.bat` file
53+
- or run `npm run mongo-windows:start` command with npm
54+
55+
### Mongo installation on Ubuntu 20.04
56+
57+
1. To prepare and setup mongo
58+
- run next in bash:
59+
- `sudo apt update && sudo apt upgrade`
60+
- `cd && cd react-notes/installMongo/Ubuntu && chmod +x mongo_ubuntu_setup.sh && chmod +x mongo_ubuntu_install.sh && cd`
61+
- `cd && ./react-notes/installMongo/Ubuntu/mongo_ubuntu_setup.sh`
62+
63+
- or run next with npm: `npm run mongo-ubuntu:full-setup`
64+
65+
2. To start Mongo database
66+
- run next in bash: `cd && ./react-notes/installMongo/Ubuntu/mongo_ubuntu_install.sh`
67+
- or run next with npm: `npm run mongo-ubuntu:start`
68+
69+
### Mongo on Heroku
70+
71+
Use [MongoDB Atlas](https://www.mongodb.com/cloud/atlas). Look video lesson [here](https://youtu.be/mTS0DH3lMNs)
4472

4573
## Deployment on Ubuntu LVS
4674

0 commit comments

Comments
 (0)