GithubHelp home page GithubHelp logo

victorjws / onlineshop Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 13.88 MB

OnlineShop with DRF and AJAX

Home Page: https://onlineshopdemo.tk/

Python 7.00% CSS 71.35% HTML 16.03% JavaScript 5.53% Shell 0.09%
drf ajax iamport nginx uwsgi onlineshop

onlineshop's Introduction

OnlineShop with DRF and AJAX

DRF로 구현한 온라인 쇼핑몰입니다. AJAX를 통해 프론트엔드에서 백엔드로 통신을 구현하였습니다.

Demo Website

https://onlineshopdemo.tk/

test 계정: [email protected] / 비밀번호: test

결제는 테스트로 진행되어 실제로 결제가 이루어지지는 않습니다!

Features

  • DRF-JWT를 이용한 로그인
  • Iamport를 이용한 온라인 결제 서비스
  • 카테고리별 상품 검색
  • 계정별 장바구니

Installation

본 쇼핑몰은 Nginx <-> uWSGI <-> Django로 구성하였습니다.

git clone https://github.com/fdsarewqvcxz/OnlineShop.git
pip install -r OnlineShop/requirements.txt

프로젝트에 포함된 .config 하위의 파일을 필요에 따라 수정합니다.

  • nginx-app-http.conf: HTTP 프로토콜을 사용하는 서버 설정 시 사용
    • server_name: 사용할 도메인명
    • location /static/: static 파일을 저장한 전체 경로
    • location /media/: media 파일(사용자가 업로드한 파일)을 저장한 전체 경로
  • nginx-app-https.conf: HTTPS 프로토콜을 사용하는 서버 설정 시 사용
  • uwsgi.ini: uWSGI 설정 파일
    • chdir: manage.py가 존재하는 파일 경로
    • module: Django 프로젝트의 wsgi 모듈
    • home: python 패키지가 존재하는 경로(virtualenv 경로)
  • uwsgi.service: uWSGI 시스템 서비스 파일
    • ExecStart=[uWSGI 설치 경로] -i [uWSGI 설정 파일 경로]
  • deploy.sh: Nginx, uWSGI 설정 등록 및 서비스 등록, 서비스 재시작 스크립트
    • line 3: HTTP/HTTPS 사용 여부에 따라 nginx-app-http.conf/nginx-app-https.conf 수정

아래 명령어를 이용하여 Nginx와 uWSGI 설정을 수정하고 서비스를 재시작합니다.

source OnlineShop/.config/deploy.sh

References

ToDo

  • 상품 Review 추가

onlineshop's People

Contributors

victorjws avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.