Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use other API ? #1062

Open
zellkon opened this issue May 25, 2020 · 7 comments
Open

how to use other API ? #1062

zellkon opened this issue May 25, 2020 · 7 comments

Comments

@zellkon
Copy link

zellkon commented May 25, 2020

No description provided.

@superlbr
Copy link
Collaborator

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)

@zellkon zellkon closed this as completed May 26, 2020
@zellkon zellkon reopened this May 26, 2020
@zellkon
Copy link
Author

zellkon commented May 26, 2020

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

@superlbr
Copy link
Collaborator

Consider Nginx?

@KirillSBarsukov
Copy link

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

@superlbr
Copy link
Collaborator

just use axios or utils/request directly @KirillSBarsukov

@jl63
Copy link

jl63 commented Oct 29, 2022

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

@superlbr
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants