Skip to content

Commit 04ed7e1

Browse files
committed
Use realistic host for MSW handler.
1 parent 9142c3f commit 04ed7e1

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

examples/crm/src/providers/fakerest/dataProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { getContactAvatar } from '../commons/getContactAvatar';
2222
import { authProvider, USER_STORAGE_KEY } from './authProvider';
2323
import { withSupabaseFilterAdapter } from './internal/supabaseAdapter';
2424

25-
const baseDataProvider = simpleRestProvider('https://localhost:4000');
25+
const baseDataProvider = simpleRestProvider('https://crm.api.marmelab.com');
2626

2727
const TASK_MARKED_AS_DONE = 'TASK_MARKED_AS_DONE';
2828
const TASK_MARKED_AS_UNDONE = 'TASK_MARKED_AS_UNDONE';

examples/crm/src/providers/fakerest/fakeServer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import { type CollectionItem, getMswHandler, withDelay } from 'fakerest';
44
import generateData from './dataGenerator';
55

66
const handler = getMswHandler({
7-
baseUrl: 'https://localhost:4000',
7+
baseUrl: 'https://crm.api.marmelab.com',
88
data: generateData() as CollectionItem,
99
middlewares: [withDelay(300)],
1010
});
1111
export const worker = setupWorker(
12-
http.all(/https:\/\/localhost:4000/, handler)
12+
http.all(/https:\/\/crm\.api\.marmelab\.com/, handler)
1313
);
1414

1515
export default () => worker;

examples/demo/src/dataProvider/graphql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const customBuildQuery: BuildQueryFactory = introspectionResults => {
115115
export default () => {
116116
const dataProvider = buildApolloClient({
117117
clientOptions: {
118-
uri: 'https://localhost:4000/graphql',
118+
uri: 'https://demo.api.marmelab.com/graphql',
119119
},
120120
introspection: {
121121
operationNames: {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import simpleRestProvider from 'ra-data-simple-rest';
22

3-
export default simpleRestProvider('https://localhost:4000');
3+
export default simpleRestProvider('https://demo.api.marmelab.com');

examples/demo/src/fakeServer/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default async (type: string) => {
1919
}
2020
}
2121
const worker = setupWorker(
22-
http.all(/https:\/\/localhost:4000/, fakeServer)
22+
http.all(/https:\/\/demo\.api\.marmelab\.com/, fakeServer)
2323
);
2424
return worker;
2525
};

examples/demo/src/fakeServer/rest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import generateData from 'data-generator-retail';
44
export default () => {
55
const data = generateData();
66
const adapter = new MswAdapter({
7-
baseUrl: 'https://localhost:4000',
7+
baseUrl: 'https://demo.api.marmelab.com',
88
data,
99
loggingEnabled: true,
1010
middlewares: [withDelay(300)],

0 commit comments

Comments
 (0)