Skip to content

mvonballmo/Assessment

Repository files navigation

Bitcoin Price Tracker

This project contains a Docker image that runs a web site that does the following:

  • shows stored BitCoin prices
  • stores a new price on each refresh of the page
  • prices older than 120 days can be purged via a link
  • was developed from start to finish in 3 hours

The following instructions are for local testing and development.

See the Development Journal for how this project was developed.

Assumptions

This project attempts to achieve the goal without using any framework, so it's close "to the metal" in a way that a more professionally produced software would not be.

Requirements

  • Docker

Setup

Demo

The application should look like the following once you've refreshed the page a few times.

Troubleshooting

If the database is created but the table is not, then the initialization script didn't run properly.

See Development Journal 17-21 for more information.

In that case, just open PHPMyAdmin and execute the following SQL manually:

CREATE TABLE `BitcoinPrices` (
                               `id` int(6) NOT NULL AUTO_INCREMENT,
                               `price_in_chf` decimal(10,3) NOT NULL DEFAULT '',
                               `date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
                               PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=utf8 PACK_KEYS=1;