V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
archergu
V2EX  ›  Electron

Electron+Nest.js 打工人的偷懒架构

  •  
  •   archergu · 24 天前 · 459 次点击

    思路,在 electron 的主进程中集成一个 nest.js 后端框架,让主进程像写后端那样,借助于 nest.js 良好的代码模块规范和成熟的生态,帮助你的 electron 可以集成更多有意思的功能。在未来需要进行 client 到 b/s 改造时还能快速抽离一个 node 后端出来,帮助你节省更多的摸鱼时间。

    搞了一些小模板供大家借鉴参考,如果能帮助到你,可以给一个 star 来满足下我的小小虚荣心~

    常规模板:

    vue+nestjs: https://github.com/ArcherGu/fast-vite-nestjs-electron

    vue+个人依赖注入小框架: https://github.com/ArcherGu/fast-vite-electron

    react+nestjs: https://github.com/ArcherGu/vite-react-nestjs-electron

    还有一套自己搞的 monorepo 模板:

    https://github.com/Doubleshotjs/template-react-nest

    https://github.com/Doubleshotjs/template-vue-nest

    1 条回复    2024-04-28 00:33:30 +08:00
    mistsobscure
        1
    mistsobscure  
       4 天前
    已 star ,刚学 Electron
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2270 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 08:07 · PVG 16:07 · LAX 01:07 · JFK 04:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.