codestates / codestates/AnimalChat
[Error Handling๐พ] server/index config.json -> jsํ์ผ๋ก ๋ณ๊ฒฝ์ ์๋ฌ
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
## ์ด๋ค ์๋ฌ์ธ๊ฐ์?
- server/index config.json -> jsํ์ผ๋ก ๋ณ๊ฒฝ์ ์๋ฌ
## ์๋ฌ ๋ฉ์์ง
```jsx
ec2 ์๋ฒ ์คํ์
Error: Cannot find module '/home/ubuntu/AnimalChat/server/models/../config/config.json'
`
## ์๋ฌ ํธ๋ค๋ง ๋ฐฉ๋ฒ
- ํธ๋ค๋ง ๋ฐฉ๋ฒ์ ๋ํด ๊ธ์ด๋ ์ฝ๋๋ก ์์ฑํด์ฃผ์ธ์.
```jsx
const config = require(__dirname + '/../config/config.json')[env];
์์ฝ๋๋ฅผ ์๋์ ๊ฐ์ ์ฝ๋๋ก ์์
const config = require(__dirname + '/../config/config.js')[env];
```
## ์๋ฌ ํธ๋ค๋ง์ ์ํด ์ฐธ๊ณ ํ ๋ ํผ๋ฐ์ค ๋งํฌ
[๋ธ๋ก๊ทธ](https://velog.io/@two_jay/9%EC%9B%94-1%EC%9D%BC%EC%9D%98-%EB%94%94%EB%B2%84%EA%B9%85-%EB%AA%A9%EB%A1%9D)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.