Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] 설정파일 분리 #12

Open
johan1103 opened this issue Mar 24, 2023 · 0 comments
Open

[feat] 설정파일 분리 #12

johan1103 opened this issue Mar 24, 2023 · 0 comments

Comments

@johan1103
Copy link
Owner

문제점

현재 스크래퍼는 menu, location, restaurant, food_type table 에 insert하는 파이썬 코드들이 분리되어있고,
각각 db 커넥션 정보를 설정할 수 있다.
외부 운영서버에 설정 정보로 커넥션 정보를 변경 하려면 4개의 파이썬 파일에서 설정 정보를 변경해야 하고, 해당 파이썬 파일들은 git으로 추적해야 하기 때문에 DB정보 노출의 위험이 있다.
db 커넥션 정보를 설정파일로 분리하고, db에 insert하는 파이썬 파일들이 해당 설정파일을 참조하는 방식으로 하는것이 나중에 발생할 개발자의 실수를 방지할 수 있다고 생각한다.

image

운영파일을 분리하지 않으면... DB설정을 바꿀 때마다 4개의 파일을 전부 바꿔야 하고 이는 나중에 일부 파일을 개발자 본인의 실수로 수정을 못할 수 있는 상황을 유발할 있다. 매번 코드들을 주석처리해야하고 작업량이 많아진다.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant