grammY bot hosting, TypeScript included
grammY is the Telegram framework most new Node.js bots use. Push the repository, set BOT_TOKEN, deploy. TypeScript builds run before the start, long polling runs on the free tier, and a webhook is one config change on a paid app.
A minimal grammY bot that deploys as is
import { Bot } from "grammy";
const bot = new Bot(process.env.BOT_TOKEN!);
bot.command("start", (ctx) => ctx.reply("Hello from FadeHost"));
bot.start();With "start": "node bot.js" in package.json it runs as is. For TypeScript, keep dist out of git and add a build script: the build runs on every deploy before the start.
grammY runner and plugins
The @grammyjs/runner package handles high update volumes with the same run(bot) call, and it needs nothing from the host. Sessions with @grammyjs/storage-free or a file adapter under /data survive redeploys; a managed Redis or PostgreSQL is one click when you outgrow files.
Webhooks with grammY
webhookCallback(bot, "express") or the built-in http adapter turns the bot into a web app. Listen on 0.0.0.0 and the PORT the panel sets, give the app a web address, and set the webhook to it. That takes a paid app so the address stays up; on the free tier keep bot.start().
Frequently asked questions
Does the TypeScript build run on the free tier?
Yes. When the entry file your start script runs is not in the repository and package.json has a build script, the build runs with devDependencies installed, on every tier.
Polling or webhook?
Polling works everywhere and needs nothing but the token: the bot asks Telegram for updates. A webhook needs a public https address; every hosted app has one at name.fadehost.app with its plan, but on the free tier that address sleeps when idle, so polling is the simpler choice for a free bot and a webhook is for a paid app that stays up.
Where does the token go?
In the environment variables of the app, as BOT_TOKEN or whatever name your code reads, never in the repository. The panel masks the values and injects them when the bot starts.
What happens when I push a commit?
With auto-deploy on, every push to the branch you chose redeploys the bot: install, build if there is one, start. The live console shows each step and the crash doctor explains a failed start in plain words.
What does the free tier include?
One bot with 256 MB of RAM, always on, placed where there is room for it (a paid plan picks the region), with the live console, environment variables and redeploys on push. A second bot or more memory is the Starter plan at $2 a month.