Skip to content

Commit bc31c20

Browse files
committed
separate
1 parent 35f5948 commit bc31c20

21 files changed

+1895
-1737
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Open [mern-notesapp.herokuapp.com](https://mern-notesapp.herokuapp.com/) or [rea
88

99
## Development
1010

11-
First of all, set up your project by creating `.env` file with next content:
11+
First of all, set up your project by creating `.env` file in `./server` folder with next content:
1212

1313
```env
1414
mongoUri = "<YOUR MONGO URI>"
@@ -17,6 +17,10 @@ jwtSecret = "<SECRET KEY>"
1717

1818
Main available scripts in the project directory:
1919

20+
### `npm install`
21+
22+
installs packages for development
23+
2024
### `npm run full-install`
2125

2226
installs client and server packages
@@ -45,7 +49,7 @@ Local `mongoUri` will be `"mongodb://localhost:27017/mydb"`
4549

4650
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)
4751

48-
2. Edit [mongo_win_install.bat](./installMongo/Windows/mongo_win_install.bat) file and fix next variables (dont use spaces around "="):
52+
2. Edit [mongo_win_install.bat](./mongo/Windows/mongo_win_install.bat) file and fix next variables (dont use spaces around "="):
4953

5054
- set `MongoDb_ExePath` - path to mongod.exe
5155
- set `MongoDb_DataFolderPath` - path to db folder
@@ -62,14 +66,14 @@ Local `mongoUri` will be `"mongodb://localhost:27017/mydb"`
6266
- run next in bash:
6367

6468
- `sudo apt update && sudo apt upgrade`
65-
- `cd && cd react-notes/installMongo/Ubuntu && chmod +x mongo_ubuntu_setup.sh && chmod +x mongo_ubuntu_install.sh && cd`
66-
- `cd && ./react-notes/installMongo/Ubuntu/mongo_ubuntu_setup.sh`
69+
- `cd && cd react-notes/mongo/Ubuntu && chmod +x mongo_ubuntu_setup.sh && chmod +x mongo_ubuntu_install.sh && cd`
70+
- `cd && ./react-notes/mongo/Ubuntu/mongo_ubuntu_setup.sh`
6771

6872
- or run next with npm: `npm run mongo-ubuntu:full-setup`
6973

7074
2. To start Mongo database
7175

72-
- run next in bash: `cd && ./react-notes/installMongo/Ubuntu/mongo_ubuntu_install.sh`
76+
- run next in bash: `cd && ./react-notes/mongo/Ubuntu/mongo_ubuntu_install.sh`
7377
- or run next with npm: `npm run mongo-ubuntu:start`
7478

7579
### Cloud Mongo connection
@@ -81,19 +85,20 @@ Use [MongoDB Atlas](https://www.mongodb.com/cloud/atlas). Look video lesson [her
8185
## Deployment on Ubuntu LVS
8286

8387
- Clone from GitHub
84-
- Run `cd react-notes && npm run deploy && cd`
88+
- Run `cd react-notes && npm install && npm run deploy && cd`
8589
- Use PM2 with this ecosystem template:
8690

8791
```js
8892
module.exports = {
8993
apps: [
9094
{
9195
name: "react-notes",
92-
script: "./react-notes/app.js",
96+
script: "./react-notes/server/app.js",
9397
watch: "./react-notes/",
9498
"ignore-watch": [
9599
"node_modules",
96100
"./react-notes/node_modules",
101+
"./react-notes/server/node_modules",
97102
"./react-notes/client/node_modules",
98103
],
99104
"max-memory-restart": "150MB",

client/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "client",
3-
"version": "0.1.0",
2+
"name": "react-notes-client",
3+
"version": "1.0.0",
44
"private": true,
55
"dependencies": {
66
"@testing-library/jest-dom": "^5.14.1",

jsdoc.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"source": {
33
"include": [
4-
"",
5-
"validation",
6-
"routes",
7-
"models",
8-
"middleware",
4+
"server",
5+
"server/validation",
6+
"server/routes",
7+
"server/models",
8+
"server/middleware",
99
"client",
1010
"client/src",
1111
"client/src/Shared",

installMongo/Ubuntu/Readme.txt renamed to mongo/Ubuntu/Readme.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ Mongo installation on Ubuntu 20.04
33
1) To prepare and setup mongo
44
run next in bash:
55
sudo apt update && sudo apt upgrade
6-
cd && cd react-notes/installMongo/Ubuntu && chmod +x mongo_ubuntu_setup.sh && chmod +x mongo_ubuntu_install.sh && cd
7-
cd && ./react-notes/installMongo/Ubuntu/mongo_ubuntu_setup.sh
6+
cd && cd react-notes/mongo/Ubuntu && chmod +x mongo_ubuntu_setup.sh && chmod +x mongo_ubuntu_install.sh && cd
7+
cd && ./react-notes/mongo/Ubuntu/mongo_ubuntu_setup.sh
88
or run next with npm:
99
npm run mongo-ubuntu:full-setup
1010

1111
2) To start Mongo database
1212
run next in bash:
13-
cd && ./react-notes/installMongo/Ubuntu/mongo_ubuntu_install.sh
13+
cd && ./react-notes/mongo/Ubuntu/mongo_ubuntu_install.sh
1414
or run next with npm:
1515
npm run mongo-ubuntu:start
File renamed without changes.

0 commit comments

Comments
 (0)