tdlight-telegram-bot-api icon indicating copy to clipboard operation
tdlight-telegram-bot-api copied to clipboard

Bot API instance homepage

Open cavallium opened this issue 4 years ago • 9 comments

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 avatar Dec 27 '20 20:12 cavallium

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.

cavallium avatar Dec 27 '20 20:12 cavallium

That would be great. 👍

MarcoBuster avatar Dec 28 '20 13:12 MarcoBuster

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

spontanurlaub avatar Jan 02 '21 20:01 spontanurlaub

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.

cavallium avatar Jan 03 '21 11:01 cavallium

@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

spontanurlaub avatar Jan 03 '21 14:01 spontanurlaub

You are right

cavallium avatar Jan 03 '21 15:01 cavallium

@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.

spontanurlaub avatar Jan 03 '21 15:01 spontanurlaub

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

luckydonald avatar Jan 04 '21 20:01 luckydonald

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

luckydonald avatar Jan 17 '21 20:01 luckydonald