Skip to content

Commit

Permalink
fix: bug where ASSET_PATH variable was not used
Browse files Browse the repository at this point in the history
refs: #70
  • Loading branch information
jaron-l committed Dec 4, 2024
1 parent 79e87f1 commit 72eaa3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ Or, if you have a docker container setup, you can run it directly:
docker exec -i ca32c16fa00e node dist/index.js
```

### `assets.json` File Path

The program first checks for the environment variable `ASSET_PATH` which should be a string path to the assets.json file to use. For example: `/home/assets.json`. If the environment variable doesn't exist, it then checks inside the current working directory of the node process. For docker deployments, this is inside the `/app` folder.

### `assets.json` Structure

Specify the assets to be updated in the `assets.json` file. The key of the hash is the LunchMoney asset ID.
Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ if (!assetsPath) {

const assets: {
[key: string]: { url: string; redfin?: string; adjustment?: number };
} = readJSON(`${process.cwd()}/assets.json`);
} = readJSON(assetsPath);

for (const [lunchMoneyAssetId, assetMetadata] of Object.entries(assets)) {
if (assetMetadata.url.includes("kbb.com")) {
Expand Down

0 comments on commit 72eaa3a

Please sign in to comment.