tdlight-team / tdlight-telegram-bot-api

The TDLight Telegram Bot API is an actively enhanced fork of the original Bot API, featuring experimental user support, proxies, unlimited files size, and more.
https://t.me/TDLight
Boost Software License 1.0
120 stars 26 forks source link

Bot API instance homepage #37

Open cavallium opened 3 years ago

cavallium commented 3 years ago

Add a very simple non-modifiable homepage on the bot api instance that shows the link of this repository, a small description on what is it, and a link to the future wiki on how to use/download it. Something like this:

TDLight Telegram Bot API

This is a customized instance of telegram bot apis.

To use it, take a look on our documentation: http://link-of-the-documentation

To host an instance, download the server from our repository: https://github.com/tdlight-team/tdlight-telegram-bot-api

cavallium commented 3 years ago

This can help the users that don't know how to find the documentation, instead of showing them the same 404 json string that appears on the other addresses.

MarcoBuster commented 3 years ago

That would be great. 👍

spontanurlaub commented 3 years ago

Or maybe the possibility to set a redirect via command line parameter? We could set the redirect on our publicly hosted instances without interfering with the default behaviour

cavallium commented 3 years ago

Or maybe the possibility to set a redirect via command line parameter? We could set the redirect on our publicly hosted instances without interfering with the default behaviour

Yes but the default behavior is not useful in any way, since every call to the bot api is made always on a subdirectory. We could do both: add a default page, and a redirect if someone changes it via the command line parameter.

spontanurlaub commented 3 years ago

@Cavallium Having a hosted webpage and a redirect doesn't make much sense. If someone wants to redirect he could simply use a html redirect, has the same effect

cavallium commented 3 years ago

You are right

spontanurlaub commented 3 years ago

@Cavallium I don't like the idea of hosting a homepage on the bot api. We would need to pack all css and other static content like images into one big html file that we would serve, adding load and memory consumption without providing much benefit over a redirect, I think a redirect to a properly hosted homepage is better.

luckydonald commented 3 years ago

That's what I envisioned the API docs to be served at.

luckydonald commented 3 years ago

I vote to close this as not in scope of the Bot API. Instead any reverse proxy is probably better for that task.