• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

kytta/toot: [MIRROR] Cross-instance share page for Mastodon

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

kytta/toot

开源软件地址(OpenSource Url):

https://github.com/kytta/toot

开源编程语言(OpenSource Language):

JavaScript 40.2%

开源软件介绍(OpenSource Introduction):

toot

Cross-instance share page for Mastodon

toot allows you to share stuff on Mastodon, cross-instance. Just put in your post text and the instance URL and click ‘Toot!’

And if you open this page with text URL parameter, it will be auto-inserted in the text field. The same goes for the instance URL parameter. This can be used to build custom share buttons for Mastodon:

<a href="https://toot.kytta.dev/?text=Hello%20world!&instance=https%3A%2F%2Fmastodon.xyz">
  Share on Mastodon
</a>

The instance URL can be saved in your localStorage to be automatically appended later — handy!

Hosting

One-click Vercel deploy

For now, toot is a tad bit vendor-locked to run on Vercel. To deploy it yourself, you can use the following button:

Deploy with Vercel

Host it yourself

Self-hosting toot outside of Vercel requires some extra setup:

  1. Make sure you have got Node.js v12 or later as well as pnpm installed

  2. Build the static part of toot:

    pnpm install    # to install dependencies
    pnpm run build  # to build the website
  3. Run the backend server for the form:

    node api/toot.js

    or if you want to run the process in the background:

    pm2 start api/toot.js --watch --ignore-watch="node_modules"

    You can find a summary for pm2 at: https://pm2.keymetrics.io/docs/usage/quick-start/

  4. Set up webserver

    1. Apache
    DocumentRoot "path_to_toot/public"
    
    ProxyPass "/api/toot"  "http://localhost:8000/"
    1. Nginx
    root path_to_toot/public;
    index.html;
    
    location /api/toot {
        proxy_pass http://localhost:8000/;
    }
    1. Caddy
    root * path_to_toot/public;
    try_files index.html
    
    handle_path /api/toot {
       reverse_proxy localhost:8000
    }
    

See also


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap