2023 Winter KAIST 몰입캠프 Week 2

공영재·2024년 1월 12일
0

문제 해결 모음 2주차

flutter, express, mysql, aws ec2


  • aws ec2 http 포트는 80만 열려있는데, 인바운드 규칙 생성은 제한이 있어서 터미널 켜서 sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000 작성하면 default port인 80으로 들어오는 인바운드를 3000으로 옮겨서 전달해줌
  • 아래와 같은 오류 처리를 console에 찍어서 디버깅

  • !!중요
    <<EC2에 DB 연결 시 문제>>
    Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
    => 아래 커맨드 실행
    use mysql;
    update user set authentication_string=password(''), plugin='mysql_native_password' where user='root';
    FLUSH PRIVILEGES;

하지만 위 커맨드 실행 시 ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(''), plugin='mysql_native_password' where user='root'' at line 1 에러 발생
=> mysql2 설치하여 해결.


이후 mysql2에서 위와 같은 문제 발생
=> mysql2 그냥 install하면 24.01.07 기준 라이브러리 내 error 있는듯 함
npm install mysql2@3.0.0 << 이 커맨드로 install

이후 .dart 아무곳에나 print(await KakaoSdk.origin); 코드 추가한 뒤 로그보고 키 해시 찾아서 kakao developer 내 어플리케이션 android에 추가

  • MVVM(Model-View-ViewModel) 디자인패턴 사용
    Model : 어떻게 데이터를 저장하고 처리하는지, 어떤 조건에서 데이터를 변경하는지에 대한 규칙을 정의
    View : 사용자의 입력을 받아 ViewModel에 전달하고, ViewModel로부터 데이터를 받아 화면에 표시
    Viewmodel : View를 위한 데이터 변환 로직을 포함하여 Model에서 데이터를 가져와 View에 표시하기 적합한 형태로 가공

  • 앱 푸시알림
    https://totally-developer.tistory.com/88

  • 앱 애니메이션
    https://cherry-forest.tistory.com/9

  • 앱 푸시알림 firebase 통한 다유저 간 사용
    https://firebase.google.com/docs/flutter/setup?hl=ko&platform=ios
    flutterfire configure에서 project 만들고, firebase console로 들어가서 만든 다음, 다시 flutterfire configure

profile
Web / Computer Vision

0개의 댓글