0
如何防止Ember代理特定請求?忽略特定請求的代理
我有一個API監聽3000端口,所以當我爲我的灰燼應用程序我運行:
ember server --proxy http://localhost:3000
一切運行時,我的應用程序發送引導GET請求我的API(這不只是罰款意在處理它們)。這是我得到的錯誤:
GET /assets/bootstrap.css.map - - ms - -
Error proxying to http://localhost:3000
connect ECONNREFUSED 127.0.0.1:3000
頁正確結束了加載,但它需要很長的時間,因爲它在等待我的API超時請求。
這聽起來像一個錯誤,你怎麼包括bootstrap? –
要麼包含該文件,要麼讓服務器以404響應。但是,您決不應該使用'ember serve'進行生產! – Lux
我包括bootstrap在ember-cli-build.js中: app.import(app.bowerDirectory +'/bootstrap/dist/css/bootstrap.css'); app.import(app.bowerDirectory +'/bootstrap/dist/js/bootstrap.js'); app.import(app.bowerDirectory +'/bootstrap/dist/fonts/glyphicons-halflings-regular.woff',{ destDir:'fonts' }); – goodoldneon777