Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

99-B-4/joonggo_world

Repository files navigation

미니프로젝트, 중고세상

📆 2022.09.19 ~ 2022.09.22



프로젝트 소개

일상에서 사용빈도가 낮은 물건들을 버리지 않고 같은 지역의 다른 사람에게 좋은 가격으로 거래할 수 있는 중고 거래 플랫폼입니다.



🛠 Tech Stack 🛠




📃 Project S.A 문서 📃



🏷 API Table 🏷

기능 Method URL Request Response
메인 페이지 로드 GET /
로그인 페이지 로드 GET /login
로그인 POST /api/login {'id_receive': username_give, 'pw_receive': password_give} 로그인 성공 - {'result': 'success', 'token': token}
로그인 실패 - {'result': 'fail', 'msg': '아이디/비밀번호가 일치하지 않습니다.'}
회원가입 POST /register {'id_receive': username_give, 'pw_receive': password_give, 'nickname_receve': user_password} {'msg': '회원가입이 완료되었습니다.'}
회원가입 id 중복체크 POST /register/check_dup {'username_receive': username_give} 중복 존재 - {'result': 'success', 'exists': True}
중복 미존재 - {'result': 'success', 'exists': False}
게시글 불러오기 GET /api/postlist 'all_posts': posts
게시글 검색 GET /api/postlist/<search_val> search_val 'all_posts': posts
상세페이지 GET /api/postdetail/<postid> postid 'all_posts': posts
상세페이지 GET /api/newpost result=request.form 'all_posts': posts


🤖 Git Action 🤖

  • main.yml (AWS 환경에 main push 시 ssh 연결 후 ./update.sh 실행)
name: updateEC2

on:
  push:
    branches:
      - 'main' # 메인이 푸쉬되었을 때 동작

  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3
      
      - name: SSH commands using password
        uses: appleboy/ssh-action@master
        with:
          host: ${{ secrets.SERVER_SSH_HOST }} # 서버  ip주소
          username: ${{ secrets.SERVER_SSH_USERNAME }} # 서버 유저이름
          key: ${{ secrets.SERVER_SSH_KEY }} # AWS 연결 키
          script:
            ./update.sh # 서버에 있는 스크립트
  • update.sh
pkill -9 python
cd joonggo_world
git pull
nohup python app.py  > log.log 2>&1  &

Secrets

  • SERVER_SSH_HOST = 서버 IP주소
  • SERVER_SSH_USERNAME = 서버 유저이름
  • SERVER_SSH_KEY = AWS 연결 키


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages