https://github.com/confact/stock-portfolio
https://github.com/confact/stock-portfolio
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/confact/stock-portfolio
- Owner: confact
- Created: 2019-06-23T01:34:22.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-19T22:06:16.000Z (over 6 years ago)
- Last Synced: 2025-02-15T14:54:22.827Z (over 1 year ago)
- Language: Ruby
- Size: 75.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
This is a simple Stock portfolio performance check - made just for fun
## Requirements
No need for database or anything, just ruby and ruby on rails.
## Install
1. Install rvm/ruby 2.5.3
2. run `bundle install` - not working? install bundler first with `gem install bundler`
3. run `rails s -b 0.0.0.0`
4. go to http://localhost:3000
### Vagrant
1. run `vagrant up`
2. run `vagrant ssh`
3. go to `/vagrant`
4. run `rails s -b 0.0.0.0`
5. go to http://localhost:3100
## I want to see this beauty live?!
I have deployed this to heroku, you can see it live here: https://stockportfolio-ninja.herokuapp.com
## ENV Variables
you would need to set a env variable for the api for https://www.worldtradingdata.com.
either add a .env file to root (where you find this file) or `/vagrant`
the .env file should contain `WORLDTRADINGDATA_TOKEN=thetoken`
You can also add the env before `rails s...` , I hope you know how that is done. :)
the ENV key is `WORLDTRADINGDATA_TOKEN`
## Tests
Some tests are there to check the core stuff like calculation of start and end budgets which the rest calculation is based on.
To run them, just do `rspec` in root or in `/vagrant` if you use the vagrant.
## Good to know
1. Limited to 3 stocks/allocations - it is built to be flexible but didn't have time to build a `add more allocation/stock`-functionality yet. Maybe soon.