Web-Page just print file-names


#1

Hello,

I tried to create a custom script and downloaded scripts from GitHub (like ExtendedAlerts).

I copied them into scripts and web, inside the root of my Phantombot-folder.

If I go to localhost:25000/customfolder the website works, but it just printed the 3 folders inside this folder out:

css
index.html
js

What did I wrong? Even after a reinstall or on another PC I get this error. The scripts are enabled in Panel.


#2

since that page isn’t coded into the bot you would need /index.html at the end too


#3

What do you mean with:

There is already one in /web/customfolder.

I made everything same like: GitHub - xtenshisanx/PhantomBot.ExtendedAlerts: Extends the default alerthandler, with an extended webpage with a 3x3 grid.

But neither my own script or this project print something else as the 1 file and the 2 folder names out


#4

do like localhost:25000/customfolder/index.html as the bot isnt coded to red that file bu default for that folder


#5

OMG :man_facepalming: - Such a dumb mistake… I tried till 4 hours to make that thing working …

Thanks man :slight_smile: that helped me a lot


#6

ya you would need to have a custom version of the PhantomBot.jar if you wanted it directed correctly :slight_smile:


#7

The short story is, it is a very lightweight webserver. We serve up a few pages by default, but, allow files to be downloaded elsewhere (some of which need a key to access). The webserver also supports the API at a certain set of endpoints. We never really intended it to be a full-blown webserver, the bot has enough other processing items to deal with :slight_smile: