基于 Webogram,经过修补和改进。在这里为所有人提供:https://web.telegram.org/k/
安装依赖:
pnpm install
这将安装所有必需的依赖项。
只需运行 pnpm start 来启动 Web 服务器和热重载任务。
在浏览器中打开 http://localhost:8080/。
运行 node build 来构建应用的最小化生产版本。将 public 文件夹内容复制到您的 Web 服务器。
- 安装依赖
docker-compose up tweb.dependencies。 - 运行开发容器
docker-compose up tweb.develop。 - 在浏览器中打开 http://localhost:8080/。
- 运行
docker-compose up tweb.production -dnginx 镜像和容器来提供构建服务 - 在浏览器中打开 http://localhost:80/。
我还创建了一个基于 Nginx 的镜像 https://hub.docker.com/r/elgammalx/tweb/tags,可以直接部署。
您可以使用 docker build -f ./.docker/Dockerfile_production -t {dockerhub-username}/{imageName}:{latest} . 来构建您的生产就绪镜像。
services:
tweb.production:
image: ghcr.io/scys/tweb:latest
ports:
- 8080:80- BigInteger.js (Unlicense)
- pako (MIT License)
- cryptography (Apache License 2.0)
- emoji-data (MIT License)
- twemoji-parser (MIT License)
- rlottie (MIT License)
- fast-png (MIT License)
- opus-recorder (BSD License)
- Prism (MIT License)
- Solid (MIT License)
- TinyLD (MIT License)
- libwebp.js
- fastBlur
- mp4-muxer (MIT License)
You are welcome in helping to minimize the impact of bugs. There are classes, binded to global context. Look through the code for certain one and just get it by its name in developer tools. Source maps are included in production build for your convenience.
- test=1: to use test DCs
- debug=1: to enable additional logging
- noSharedWorker=1: to disable Shared Worker, can be useful for debugging
- http=1: to force the use of HTTPS transport when connecting to Telegram servers
Should be applied like that: http://localhost:8080/?test=1
You can also take and load snapshots of the local storage and indexed DB using the ./snapshot-server mini-app. Check the README.md under this folder for more details.
You can see all the available svg icons by calling the showIconLibrary() global function in the browser's console.
If you find an issue with this app or wish something to be added, let Telegram know using the Suggestions Platform.
The source code is licensed under GPL v3. License is available here.