GithubHelp home page GithubHelp logo

metabase-to-shopify-counter's Introduction

Metabase to Shopify Counter

This Sinatra app fetches and updates numbers from a given list of JSON URLs from metabase and stores them in an SQLite database. It also provides a simple web interface to manage the URLs and display their numbers. A JSON endpoint is also exposed to view the sum of all the numbers from the various metabase URLs.

Features

  • Add and remove URLs to fetch data from
  • Fetch and update numbers from the specified URLs
  • Schedule tasks to fetch and update numbers at regular intervals
  • Display a list of URLs and their associated numbers
  • Calculate the sum of all numbers

Prerequisites

  • Ruby 2.6 or higher
  • Bundler gem

Setup

  1. Clone the repository:
git clone https://github.com/basilkhan05/metabase-to-shopify-counter.git
  1. Change to the project directory:
cd metabase-to-shopify-counter
  1. Install dependencies:
bundle install
  1. Run the application:
rackup -p 4567
  1. Open your web browser and navigate to http://localhost:4567/ to start using the application.

Usage

  1. Add a URL by entering it in the input field and clicking the "Add" button. The URL must return a JSON response with a number.

  2. The application will automatically fetch and update the numbers from the specified URLs every 30 seconds.

  3. View the list of URLs and their associated numbers by navigating to http://localhost:4567/.

  4. Remove a URL by clicking the "Delete" button next to the corresponding URL in the list.

  5. Get the sum of all numbers by sending a GET request to http://localhost:4567/sum.json. The response will be a JSON object containing the sum.

License

This project is licensed under the MIT License - see the LICENSE file for details.

metabase-to-shopify-counter's People

Contributors

basilkhan05 avatar

Watchers

 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.