aboutsummaryrefslogtreecommitdiff

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 if you haven't already.

Start the server with:

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.