Giter Site home page Giter Site logo

hs_mathkg's Introduction

A Data Visualization Webapp Demo

  • Edit Page
    • editgraph
  • About
    • aboutus

Repo Url

Tools

  • Server-end

    • flask
    • mongodb
  • Front-end

    • echarts
    • bootstrap
    • font awesome
  • Deployment

    • gunicorn

Dependencies and Virtual Environment

  • First you need to install python(3.6 or above) and python virtual environment and create your own virtural environment (e.g. venv) under the project folder by typing "$ python -m venv venv".
  • Activate virtual environment by: Open the project folder in terminal, type"$ source ./venv/bin/activate". You may also do this via Python Ides(e.g. pycharm) by configging the interpreter as venv and the python inside the folder.
  • If you activated your virtual environment successfully, your will see "(venv)" in your command line
  • Dependencies in a virtual environment can be exported: $ pip freeze > requirements.txt
  • Dependencies can be installed into a virtual environment: $ pip install -r requirements.txt

restore our data in your mongodb

  • the dump file is in app/static/data/dump
  • use the restore command: mongorestore app/static/data/dump

How to run with dev server

  1. Make sure you have your virtual environment activated

  2. Install dependencies into your virtual environment

  3. You can run server by typing:"$ python run_server.py" and open the link "http://127.0.0.1:5000/" in your browser

  4. Use "ctrl+c" to stop the server and use "$ deactivate" to quit virtual environment

How to run with production server

  1. Make sure you have your virtual environment activated

  2. Install dependencies into your virtual environment

  3. Run server in background: $ gunicorn run_server:app -p run_server.pid -b "your ip":"your port" -D

  4. See the pid of your server: $ cat run_server.pid

  5. Shutdown your server: $ kill "pid of your server"

hs_mathkg's People

Contributors

cantoria avatar h0radriccube avatar litong-x avatar

Watchers

 avatar

Forkers

jane-eyre

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.