GithubHelp home page GithubHelp logo

kernel1994 / qahole-flask Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 162 KB

A web project powered by Flask and Vue

Python 11.07% JavaScript 53.86% HTML 0.54% Vue 32.75% Batchfile 0.41% CSS 1.38%
flask vue

qahole-flask's Introduction

A web project powered by Flask

Abstract

就不写简介了(方丈别打我啊)

Run

  • Web API (Flask project) on Windows CMD, in backend:

    set FLASK_APP=api
    set FLASK_ENV=development
    flask run
    

    Listen on http://127.0.0.1:5000/api/*

  • Web Page (Vue project) on Windows CMD, in frontend:

    npm run dev
    

    Listen on http://127.0.0.1:8081

  • Nginx

    add in `conf/nginx.conf` ``` upstream webpage { server localhost:8081; }
    upstream webapi {
        server localhost:5000;
    }
    
    server {
        listen       8080;
        server_name  localhost;
    
        #charset koi8-r;
    
        #access_log  logs/host.access.log  main;
    
        location / {
            proxy_pass http://webpage;
    
            proxy_set_header Host            $host;
            proxy_set_header X-Real-IP       $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    
        location /api/ {
            proxy_pass http://webapi;
        }
    
        #error_page  404              /404.html;
    
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
    ```
    

    on Windows CMD:

    start nginx
    

    or restart config:

    nginx -s reload
    

Now head over to http://127.0.0.1:8080

TODO

  • 前后端分离
  • RESTful API
  • 响应式样式
  • 评论加载、个人页等功能
  • 滚动加载
  • 全局搜索
  • 精选、备注
  • ORM

See Also

qahole-flask's People

Stargazers

 avatar

Watchers

James Cloos avatar  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.