diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..84f97e7 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# S&P 500 Stock Screener + +A simple Node.js application for screening stocks and uploading that data to a google spreadsheet, without any external dependencies. + +## Setup + +1. **Clone the repository:** + ```bash + git clone https://www.git.mfoi.dev/stock-screener.git/ + cd stock-screener + ``` + +2. **Configure environment variables:** + - Create a `.env` file in the root directory following the template. + - Example `.env`: + ``` + PORT=3000 + STOCK_SCREENER_AUTH_TOKEN=1234567 + ``` + +## Running the Server + +First, [install Node.js](https://nodejs.org/en/download/) if you haven't already. + +Start the server with: +```bash +node server.js +``` + +The server will run on the port specified in your `.env` file. + +## Usage + +The server has two purposes: +1. Update the stock metrics to the spreadsheet weekly. +2. Provide a REST API for updating the spreadsheet on demand. +The only endpoint is `http://localhost:{env.PORT}/api/update-stock-screener?token=${env.STOCK_SCREENER_AUTH_TOKEN}`. + +This is meant to be run in the background but still allows for manual triggering via the API. Obviously, you should secure this endpoint in a production environment. |