Showing
1 changed file
with
28 additions
and
13 deletions
| ... | @@ -32,30 +32,45 @@ | ... | @@ -32,30 +32,45 @@ |
| 32 | ## Getting Started (Installation) | 32 | ## Getting Started (Installation) |
| 33 | 33 | ||
| 34 | ### Set up | 34 | ### Set up |
| 35 | -```bash | 35 | +```sh |
| 36 | git clone http://khuhub.khu.ac.kr/2021105636/Extended-Calendar.git | 36 | git clone http://khuhub.khu.ac.kr/2021105636/Extended-Calendar.git |
| 37 | npm install | 37 | npm install |
| 38 | npm install -g nodemon | 38 | npm install -g nodemon |
| 39 | npm install -g pm2 | 39 | npm install -g pm2 |
| 40 | ``` | 40 | ``` |
| 41 | 41 | ||
| 42 | +Make `.env` in root directory. | ||
| 43 | +```sh | ||
| 44 | +# MySQL | ||
| 45 | +DB_HOST= | ||
| 46 | +DB_USER= | ||
| 47 | +DB_PASSWORD= | ||
| 48 | +DB_DATABASE= | ||
| 49 | + | ||
| 50 | +# Express | ||
| 51 | +SERVER_IP= | ||
| 52 | + | ||
| 53 | +# React | ||
| 54 | +REACT_APP_IP= | ||
| 55 | +REACT_APP_SERVER_IP= # generally all the same | ||
| 56 | +``` | ||
| 57 | + | ||
| 58 | +Import `schema.sql` in your DB. | ||
| 59 | + | ||
| 42 | ### Run to debug | 60 | ### Run to debug |
| 43 | -> Terminal 1 ( Server ) | 61 | +Terminal 1 ( Server ) |
| 44 | -> | 62 | +```sh |
| 45 | -> ``` | 63 | +npm run server |
| 46 | -> npm run server | 64 | +``` |
| 47 | -> ``` | 65 | +Terminal 2 ( React ) |
| 48 | -> | 66 | +```sh |
| 49 | -> Terminal 2 ( React ) | 67 | +npm start |
| 50 | -> | 68 | +``` |
| 51 | -> ``` | ||
| 52 | -> npm start | ||
| 53 | -> ``` | ||
| 54 | 69 | ||
| 55 | port : 3000 | 70 | port : 3000 |
| 56 | <br> | 71 | <br> |
| 57 | ### Run to deploy | 72 | ### Run to deploy |
| 58 | -``` | 73 | +```sh |
| 59 | npm run build | 74 | npm run build |
| 60 | npm run pm2 | 75 | npm run pm2 |
| 61 | ``` | 76 | ``` | ... | ... |
-
Please register or login to post a comment