Myurls

Alternatives To Myurls
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Pygmy605
4 months ago17mitPython
An open-source, feature rich & extensible url-shortener + analytics written in Python :cookie:
Dogbin354
3 months ago15mitKotlin
The sexiest pastebin and url shortener ever
Reduced.to348
11 hours ago16mitTypeScript
Free Modern URL Reducer. Make sure to share love by giving it a star.🌟 Have a great day!
Myurls194
a month ago6mitGo
Your Own URL Shortener
Longs190
6 years ago3gpl-2.0C
URL Shortener built on top of WAFer
Shlink Web Client184
a day ago23mitTypeScript
A React-based client application for Shlink
Minimal Url Shortener112
8 months agomitC#
An example web app based on the new feature in .NET 6 | minimal web API in ASP.NET 6
Delta88
2 years agomitJavaScript
A file uploader + URL shortner written in node for your private cloud
Lynx50
6 hours ago1mitVue
A fullstack application using the MEVN stack to shorten your URLs.
Saveto48
a month ago2HTML
Saveto. Quick for save link, collections, notes, snipping, ...
Alternatives To Myurls
Select To Compare


Alternative Project Comparisons
Readme

MyUrls

基于 Go 1.20 与 Redis 实现的本地短链接服务,用于缩短请求链接与短链接还原。

Table of Contents

Update

  • 20200330 集成前端至根路径,如: http://127.0.0.1:8002/

    注:如需使用集成的前端,项目部署请 clone 仓库后自行编译,并在代码根目录启动服务。或者可 nginx 单独配置 root 至 public 目录的 index.html。

Dependencies

本服务依赖于 Redis 提供长短链接映射关系存储,你需要本地安装 Redis 服务来保证短链接服务的正常运行。

sudo apt-get update

# 安装Redis
sudo add-apt-repository ppa:chris-lea/redis-server -y 
sudo apt-get update 
sudo apt-get install redis-server -y 

Docker

现在你可以无需安装其他服务,使用 docker 或 docker-compose 部署本项目。注:请自行修改 .env 中参数。

docker run -d --restart always --name myurls careywong/myurls:latest -domain example.com -port 8002 -conn 127.0.0.1:6379 -passwd '' -ttl 90
git clone https://github.com/CareyWang/MyUrls.git MyUrls

cd MyUrls
cp .env.example .env

docker-compose up -d

Deploy Online

Deploy on Railway

部署

Deploy on Railway

通过上方链接一键部署到Railway,并填入以下参数

参数说明:

  • DOMAIN - 短链接域名,必填项,不需要添加https:// (如 abc.com)
  • TTL - 短链接有效期,单位(天),默认180天 (default 180)
  • PORT - 端口,保持80,请勿修改

添加域名

在Cloudflare中添加域名,并配置SSL/TLS为完全及以上,并在Railway中接入该域名,参考官方文档

Install

安装项目依赖

make install

生成可执行文件,目录位于 build/ 。默认当前平台,其他平台请参照 Makefile 或执行对应 go build 命令。

bash release.sh

Usage

前往 Release 下载对应平台可执行文件。

./build/linux-amd64-myurls -h 

Usage of ./build/linux-amd64-myurls:
  -conn string
        Redis连接,格式: host:port (default "127.0.0.1:6379")
  -domain string
        短链接域名,必填项
  -passwd string
        Redis连接密码
  -port int
        服务端口 (default 8002)
  -ttl int
        短链接有效期,单位(天),默认180天。 (default 180)

建议配合 pm2 开启守护进程。

pm2 start myurls --watch --name myurls -- -domain example.com

API

参考文档

Maintainers

@CareyWang

Contributing

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2020 CareyWang

Popular Url Shortener Projects
Popular Docker Projects
Popular Applications Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Go
Golang
Docker
Redis
Makefile
Url Shortener