0.0.3 • Published 6 years ago

invest.js v0.0.3

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

invest

invest.js is a tool for importing CSV files with time series data for stocks into a MySQL database. It uses two AWS S3 buckets, one for importing CSV files into the MySQL database and one for exporting the database to CSV files.

Setup

Create two AWS S3 buckets, one for imports and one for exports. Setup the bucket for export as a static website in order to make it easily accessible. Use the shell script in the folder s3 to upload a basic index.html and error.html.

Copy setenv.template to setenv and update with your credentials for the S3 buckets and the MySQL database. Then make sure to source setenv before running the scripts.

When using docker, mount a bind volume in by adding this option: -v "$(pwd)":/git in order to make the scripts available in the container.

Usage

Show the help with: node index.js help.

Development

When developing, make sure that a separate database schema has been configured in setenv.dev. Then run the tests using run_cli_test.sh.

s3cmd from s3tools is used in run_cli_test.sh to manage the S3 buckets. An alternative is aws cli but the script needs to be updated if this is used instead.