lloydsheng
V2EX  ›  Apple

2 天时间用 Swift 撸了一个捷径分享小站

  •  
  •   lloydsheng · Oct 2, 2018 · 10133 views
    This topic created in 2959 days ago, the information mentioned may be changed or developed.

    捷径盒

    主要目的:Swift 练手,尝试一下服务器端 Swift 开发。

    Web 框架采用 Vapor,源代码是在 Sharecuts 基础上开发的,改动很多:

    1. 图片和捷径文件存储到了七牛
    2. 数据库换成了 MySQL,原始版本是 PostgreSQL
    3. 风格优化了一下
    4. 增加了微信里打开提示

    本来想部署在 Linux 系统上,无奈有些苹果的库在 Linux 上没有实现😳,还是暂时部署在 macOS 系统上。国内目前好像没有 mac 主机服务商,而且我的域名也没时间备案,先在国外服务商 hostmyapple 买了一个的最便宜的主机部署上了🚀。

    目前的功能很简单,捷径列表,查看详情和上传。有时间还会再继续优化完善,希望得到各位 V 的意见和建议。 有好玩的捷径上传上去啊!!!

    最后,小站链接奉上 💁‍♂️ 捷径盒

    46 replies  •  2019-10-16 18:23:32 +08:00
    d5
    d5
    Oct 2, 2018
    1
    排版和画风都非常非常不错!
    whileFalse
    whileFalse
    Oct 2, 2018
    2
    用 Swift 写的挺酷。不过,颜色瞎眼。
    whileFalse
    whileFalse
    Oct 2, 2018
    3
    看了下 hostmyapple,25usd 一个月 4core/2g/40g,楼主真下得去手?
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    4
    @whileFalse 哈哈哈颜色是自动生成的,可能算法要优化一下 https://bendodson.com/weblog/2016/09/10/generating-random-colour-with-seed-in-swift/
    RqPS6rhmP3Nyn3Tm
    RqPS6rhmP3Nyn3Tm
    Oct 2, 2018 via iPhone
    5
    服务端 swift ……太强了
    huclengyue
    huclengyue
    Oct 2, 2018 via Android
    6
    还有 mac 的主机,第一听说。落伍了😂
    whileFalse
    whileFalse
    Oct 2, 2018
    7
    @lloydsheng 建议去配色网站找一组颜色。完全随机的颜色确实不行。
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    8
    @whileFalse 找了好几家 XCloud, MacInCloud, MacStadium,还算是 hostmyapple 便宜点,虽然界面是最丑的,mac 主机价格感人😂
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    9
    @huclengyue 一直都有,以前很多人用来做 CI 系统
    20015jjw
    20015jjw
    Oct 2, 2018 via Android
    10
    看截图不错
    dawn009
    dawn009
    Oct 2, 2018
    11
    楼主有测试过性能吗?比起其他 web 后端如何?
    我曾经用 Perfect 框架试过做网站,但发现性能没比 php 好多少,于是放弃了。
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    12
    @dawn009 没去测,性能不是主要考虑吧,网站也不会有很大用户量,主要是想写写 Swift
    这里有篇文章可以参考 https://medium.com/@rymcol/benchmarks-for-the-top-server-side-swift-frameworks-vs-node-js-24460cfe0beb
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    13
    @whileFalse 嗯。有时间优化一下,苹果捷径 APP 里面的卡片背景好像是限制在几种特定的颜色。
    surewen
    surewen
    Oct 2, 2018
    14
    赞!楼主开发用 xcode 么,还是用普通的 code editor
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    15
    @surewen 写 Swift 用 xcode,因为调试方便,写 JS 和 HTML 用 VS Code,有更好的方式吗?
    kookpua
    kookpua
    Oct 2, 2018 via iPhone
    16
    内容太少啦
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    17
    @kookpua 会陆续添加更多
    Quarter
    Quarter
    Oct 2, 2018 via Android
    18
    收藏了 感谢大佬分享😁
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    19
    @Quarter 刚刚已经收录了一大批捷径,应该是目前最全的
    makry
    makry
    Oct 2, 2018
    20
    色块风没毛病,但选的颜色饱和度过高,辣眼睛,,,
    捷径资源待丰富,推荐一个少数派的 https://shortcuts.sspai.com/#/main/workflow
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    21
    @makry 之前有 bug,没有显示完全,资源数和少数派差不多
    run2
    run2
    Oct 2, 2018
    22
    lz macos 主机 有 macOS server mdm/profile manager 么?
    kingcos
    kingcos
    Oct 2, 2018 via iPhone
    23
    直接用 Ubuntu 16.04 不就可以了么
    34
    34
    Oct 2, 2018 via iPhone
    24
    希望能加段介绍啥的
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    25
    @Taosky 收到建议,想每个都录个视频,看起来更容易知道是干嘛的
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    26
    @kingcos 不行,编译不了,单 Foundation 库在 Linux 下就有很多 API 没有支持,其他的坑更多
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    27
    @sobigfish 可以自己安装,我就自己安装了 Xcode 9.3
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    28
    @makry
    @whileFalse 网上找了几十组设计师推荐高斯渐变色,现在的效果好多了😊
    CommandZi
    CommandZi
    Oct 2, 2018
    29
    Swift 好评
    可以加个分类或者搜索,现在这样检索不便
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    30
    @CommandZi 会尽快加搜索或分类
    frozenthrone
    frozenthrone
    Oct 2, 2018 via iPhone
    31
    搭车发个刚用 github pages 搭建的直播站吧 http://tv.jstudio.win https://i.loli.net/2018/10/02/5bb32ab8c3180.png
    hysw2009
    hysw2009
    Oct 2, 2018
    32
    服务器好贵
    lloydsheng
    lloydsheng
    OP
    Oct 2, 2018
    33
    @hysw2009 不纠结用 swift 可以买很便宜的服务器
    EVJohn
    EVJohn
    Oct 3, 2018
    34
    hello,可否在网页端增加“在线创建编辑”和“查看已有的捷径结构”的功能
    Jackiepie
    Jackiepie
    Oct 3, 2018
    35
    手动点赞
    tigerAndBull
    tigerAndBull
    Oct 4, 2018
    36
    这个页面也是 swift 写的?
    lloydsheng
    lloydsheng
    OP
    Oct 8, 2018
    37
    @EVJohn “在线创建编辑”是更新已有捷径?
    “查看已有的捷径结构” 这个是查看捷径的步骤?
    lloydsheng
    lloydsheng
    OP
    Oct 8, 2018
    38
    @Jackiepie 谢谢
    lloydsheng
    lloydsheng
    OP
    Oct 8, 2018
    39
    @tigerAndBull 后端都是 Swift,前端用 JS 和 HTML,UI 用了框架 Skeleton
    EVJohn
    EVJohn
    Oct 8, 2018
    40
    @lloydsheng 在线创建编辑,是建立一个新的捷径 or 修改已有捷径。毕竟手里只有一台 SE,改的参数太多就很费解了。
    “查看已有的捷径结构” 这个是查看捷径的步骤? 是的
    Neonbb
    Neonbb
    Oct 9, 2018 via iPhone
    41
    玩坏你的 iPhone,真的把我手机玩坏了。搞了一个小时才能解锁使用
    lloydsheng
    lloydsheng
    OP
    Oct 10, 2018
    42
    @Neonbb 哈哈哈哈哈哈哈哈
    Neonbb
    Neonbb
    Oct 10, 2018 via iPhone
    43
    @lloydsheng iPhone x 密码解锁界面没法输入密码。进系统后,顶部通知清除不掉,只有手势可以用。想关机,关机位置也被挡住了。
    我在想,这捷径什么时候才会自动恢复正常使用?
    lloydsheng
    lloydsheng
    OP
    Oct 10, 2018
    44
    @all 更新了,支持搜索和分类 https://www.v2ex.com/t/496187
    nicejkkk
    nicejkkk
    Oct 12, 2018
    45
    优秀老哥
    yingzir
    yingzir
    Oct 16, 2019
    46
    请问以下,国外服务器,怎么备案的?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   650 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 74ms · UTC 23:16 · PVG 07:16 · LAX 15:16 · JFK 18:16
    ♥ Do have faith in what you're doing.