mirror of
https://github.com/gosticks/web.git
synced 2026-12-03 17:51:39 +00:00
Merge branch 'development' into patch-1
This commit is contained in:
@@ -1,8 +1,31 @@
|
||||
# Pi-hole Web Interface
|
||||
|
||||
View stats and control your Pi-hole via this web interface. For the previous PHP-based web interface, see [pi-hole/AdminLTE](https://github.com/pi-hole/AdminLTE/).
|
||||
View stats and control your Pi-hole via this web interface. For the previous PHP-based web interface,
|
||||
see [pi-hole/AdminLTE](https://github.com/pi-hole/AdminLTE/).
|
||||
|
||||
Preview:
|
||||

|
||||

|
||||

|
||||
|
||||
## Getting Started (Development)
|
||||
|
||||
- Install Node + NPM (usually installed together): https://nodejs.org/
|
||||
- Install at least 8.x.x
|
||||
- You should either install it via your package manager or one of the curl | bash scripts they provide:
|
||||
https://nodejs.org/en/download/package-manager/
|
||||
- You should also install your distro's build tools just in case
|
||||
- `build-essential` for Debian distros, `gcc-c++` and `make` for RHEL distros
|
||||
- Fork the repository and clone to your computer (not the Pi-hole). In production the Pi-hole only needs the compiled
|
||||
output of the project, not its source
|
||||
- Open the folder in the terminal
|
||||
- Run `npm install`
|
||||
- This will install all the packages listed in `package.json` and will let you build/run the web interface
|
||||
- Run `npm start` to make sure that it is working
|
||||
- This will launch the web interface on port 3000 in debug mode
|
||||
- If it crashes/has a compile error it will show you the code and the error
|
||||
- Changes will be automatically applied and the web interface will reload
|
||||
- If you've never used React, you should read the [React Quick Start](https://reactjs.org/docs/hello-world.html) and/or
|
||||
the [Tutorial](https://reactjs.org/tutorial/tutorial.html) before diving too deep into the code.
|
||||
- When you are ready to make changes, make a branch off of `development` in your fork to work in. When you're ready to
|
||||
make a pull request, base the PR against `development`.
|
||||
+1
-1
@@ -157,7 +157,7 @@ export const api = {
|
||||
else if(config.developmentMode)
|
||||
apiLocation = "pi.hole/admin/api";
|
||||
else
|
||||
apiLocation = window.location.hostname + "/admin/api";
|
||||
apiLocation = window.location.hostname + (window.location.port ? ':' + window.location.port : '') + "/admin/api";
|
||||
|
||||
return window.location.protocol + "//" + apiLocation + "/" + endpoint;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user