V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
SharkIng
V2EX  ›  问与答

在一个测试服务器上用 grunt serve 启动 angular 然后用 nginx 反代到域名:80,怎么解决资源路径问题?

  •  
  •   SharkIng · Feb 23, 2016 · 1474 views
    This topic created in 3724 days ago, the information mentioned may be changed or developed.
    例如 bower_components/里的; scripts/里的内容??
    现在提示是说 http://域名 /bower_components/xxxxxxx 不存在, scripts 一样

    用的是 yo 官方的 angular 脚手架

    暂时因为只是测试和 demo 所以不准备 build ,有没什么解决办法??
    1 replies    2016-02-23 17:36:51 +08:00
    hxsf
        1
    hxsf  
       Feb 23, 2016
    nginx 里多写个路径匹配, root 填你静态资源位置呗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2630 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 11:49 · PVG 19:49 · LAX 04:49 · JFK 07:49
    ♥ Do have faith in what you're doing.