Skip to content

Commit

Permalink
base path for proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandawg93 committed Dec 28, 2023
1 parent 0c1e0e3 commit aafa3b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
30 changes: 8 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Variable | Default | Description |
NUT_HOST | localhost | Host of NUT server |
NUT_PORT | 3493 | Port of NUT server |
WEB_PORT | 8080 | Port of web server |
BASE_PATH | undefined | Base path for reverse proxy |

## API

Expand All @@ -58,30 +59,15 @@ WEB_PORT | 8080 | Port of web server |

## Homepage Support

With v1.3.0, initial support has been added for [Homepage](https://github.com/benphelps/homepage) to add a custom api widget. An example can been seen below:
For information about how to set up Homepage, check the [Homepage docs](https://gethomepage.dev/latest/widgets/services/peanut/).

Ex:

```
widget:
type: customapi
url: http://{hostname}:{port}/api/v1/devices/ups
mappings:
- field: battery_charge
label: Battery Charge
format: percent
- field: ups_load
label: UPS Load
format: percent
- field: ups_status
label: UPS Status
format: text
remap:
- value: OL
to: Online
- value: OB
to: On Battery
- value: LB
to: Low Battery
- any: true
to: Unknown
type: peanut
url: http://peanut.host.or.ip:port
key: nameofyourups
```

## Tested Devices
Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
basePath: process.env.BASE_PATH,
};

module.exports = nextConfig;

0 comments on commit aafa3b5

Please sign in to comment.