antd-admin icon indicating copy to clipboard operation
antd-admin copied to clipboard

how to use other API ?

Open zellkon opened this issue 5 years ago • 7 comments

zellkon avatar May 25 '20 03:05 zellkon

there're two type api in antd-admin:

  1. based on hostname + apiPrefix, in src/services/api.js
  2. like queryWeather (defined in src/services/index.js), with proxy (defined in .umirc.js)

superlbr avatar May 25 '20 03:05 superlbr

there're two type api in antd-admin:

  1. based on hostname + apiPrefix, in src/services/api.js
  2. like queryWeather (defined in src/services/index.js), with proxy (defined in .umirc.js)

Where can i change it? i have api like : https://services.com/api/{routers} I already change proxy in .umirc but nothing change. application just run localhost:7000/api

zellkon avatar May 26 '20 08:05 zellkon

Consider Nginx?

superlbr avatar May 26 '20 16:05 superlbr

How about graphql? We have a single endpoint like /graphql and we make a POST request to operate the data(CRUD)

KirillSBarsukov avatar Apr 21 '22 20:04 KirillSBarsukov

just use axios or utils/request directly @KirillSBarsukov

superlbr avatar Apr 22 '22 01:04 superlbr

I have the same question. How can I change the proxy to be the port that is running the backend? I add proxy in package.json but nothing change

jl63 avatar Oct 29 '22 08:10 jl63

proxy in package.json is only work in dev @jl63

superlbr avatar Oct 29 '22 13:10 superlbr