데이터를 모의하기 위해 Ember-cli-mirage를 사용하고 있습니다. 내 로컬 컴퓨터에있는 프로덕션 API의 부분을 천천히 http://localhost:8000에 통합하려고합니다. Ember docs tell me 나는 각 모델마다 다른 호스트를 가질 수 있도록 어댑터를 설정할 수 있어야합니다.Ember 모델 호스트 어댑터가 신기루를 초과하지 않습니다.
나는 customer
모델을 가지고 있으며 성공적으로 데이터를 제공하는 설정 ember-cli-mirage를 가지고 있습니다. 고객 모델은 localhost : 8000으로 분리하려는 첫 번째 모델입니다.
import DS from 'ember-data';
export default DS.RESTAdapter.extend({
host: 'http://localhost:8000',
namespace: 'api/v1'
});
을하지만 내가 오류 받고 있어요 호출 할 때 :
나는 다음과 같이 설정 어댑터/customer.js을했습니다
Mirage: Error: Your Ember app tried to GET 'http://localhost:8000/api/v1/customers',
but there was no route defined to handle this request.
Define a route that matches this path in your
mirage/config.js file. Did you forget to add your namespace?
그리고 내 헤더 관리자를 보여줍니다 고객이 신기루 서버에 요청하는 중입니다.
Request URL:http://localhost:6543/customers
Request Method:GET
Status Code:304 Not Modified
Remote Address:[::1]:6543
내 사기와 관련이 있다고 생각합니다. 그림/환경 .js 설정 그래서 나는 잠재적 인 해결 방법으로 https://github.com/samselikoff/ember-cli-mirage/issues/497#issuecomment-183458721의 변형을 찾고 있어요. 하지만 왜 신기루가 어댑터를 무시할 수 없는지 나는 알 수 없습니다.