Giter Club home page Giter Club logo

bodybuilding-posts's Introduction

Bodybuilding Forum Archive

A Flask web application that displays the top posts of the day from the Bodybuilding.com's infamous "misc" forum.

Getting Started: Development Environment

Clone the repository

git clone https://github.com/malshoff/bodybuilding-posts.git

Prerequisites

The required Python 3 libraries are included in requirements.txt. Navigate to the parent directory and run

pip install -r requirements.txt

An environment variable will need to be set to tell flask which app to run (on windows replace "export" with "set"):

export FLASK_APP=hello.py

You will also need an environment variable containing the connection string (provided by mlab).

export CONNECT_STRING=$MLAB_CONNECT_STRING

Alternatively, edit hello.py so that CONNECT_STRING references a connection to your own MongoDB instance. The format of one document in the database is as follows:

{
    "_id": {
        "$oid": "5b9590dfa5b6b0f2aae6006a"
    },
    "title": "Sprite Zero is the best diet soda on the market",
    "url": "https://forum.bodybuilding.com/showthread.php?t=176190941&s=16dc44fe1941c6ccf94c476f27723c40",
    "replies": 32,
    "views": 591,
    "op": "Getter_done",
    "date": {
        "$date": "2018-09-10T03:24:30.959Z"
    }
}

Running the Dev Server

Navigate to the root directory and run

flask run

The app will run (by default) on localhost:5000

Built With

  • Flask - The web framework used
  • PyMongo - MongoDB API
  • mLab - Free MongoDB hosting

bodybuilding-posts's People

Contributors

dependabot[bot] avatar malshoff avatar

Watchers

 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.