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

OpenWRT 可以运行 React 前端页面吗?

  •  
  •   feng32 · 2020-12-27 23:47:58 +08:00 via Android · 3097 次点击
    这是一个创建于 1215 天前的主题,其中的信息可能已经有所发展或是发生改变。
    没怎么用过 React,求指点
    5 条回复    2020-12-28 16:33:48 +08:00
    pagxir
        1
    pagxir  
       2020-12-27 23:56:55 +08:00   ❤️ 2
    react 是在浏览器端的,跟 OpenWRT 没有关系。
    gunpowderfans
        2
    gunpowderfans  
       2020-12-28 06:28:46 +08:00 via Android
    把页面 build 成 index.html 这些就行了
    sbilly
        3
    sbilly  
       2020-12-28 09:23:09 +08:00
    类似于这样的? https://github.com/zhaojh329/oui 这个是基于 vue 的
    macy
        4
    macy  
       2020-12-28 12:32:52 +08:00
    可以啊,react 写好后会 build 成一个 index.html 加很多 js,openwrt 是个 linux,在上面跑个 server,把 index.html return 回去就行了
    Curtion
        5
    Curtion  
       2020-12-28 16:33:48 +08:00
    像一楼说的一样,但是还是建议用 luci 那一套,可以省很多事。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1286 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 23:30 · PVG 07:30 · LAX 16:30 · JFK 19:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.