archergu
V2EX  ›  Electron

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

  •  
  •   archergu · Apr 8, 2024 · 3262 views
    This topic created in 800 days ago, the information mentioned may be changed or developed.

    思路,在 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 replies    2024-04-28 00:33:30 +08:00
    mistsobscure
        1
    mistsobscure  
       Apr 28, 2024
    已 star ,刚学 Electron
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4029 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 205ms · UTC 05:26 · PVG 13:26 · LAX 22:26 · JFK 01:26
    ♥ Do have faith in what you're doing.