Comments (3)
I think, everything is ok. :)
from connect-api-mocker.
Thank you @muratcorlu it is my side understanding issue.
- is it possible to give multiple proxy using express server ?
- If it is not possible, how to use webpack project ?
Like this ....
from connect-api-mocker.
Yes, your example should work. But keep in your mind, in this configuration, for example, if you make a request to /backend/api/v1/users/1
and if you don't have a mock defined for that path than request will be proxied to https://api.backend.yourdomain.com/backend/api/v1/users/1
. If you don't want to have backend
prefix in your proxied url, then you need to rewrite in proxy configuration like:
proxy: {
'/backend': {
target: 'https://api.backend.yourdomain.com',
pathRewrite: {"^/backend" : ""}
}
....
Detailed information: https://webpack.js.org/configuration/dev-server/#devserver-proxy
from connect-api-mocker.
Related Issues (20)
- Undefined baseUrl property when using with Connect HOT 3
- ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'api/users' HOT 18
- Writing test cases for lite-server implementation
- Update(or add) express.js independent examples
- Custom response middleware without `body-parser` HOT 9
- put.js behaves slow(10s+) HOT 2
- Custom global response header for all requests.(CORS) HOT 1
- Catch all nested paths HOT 1
- Using semantic-release for automating releases HOT 1
- Returning images as mock HOT 6
- Custom response helper methods HOT 1
- Action required: Greenkeeper could not be activated 🚨
- Facing cors issue HOT 2
- [Feature Request] Add wildcard support for json files HOT 6
- [Feature Request] Enable logging HOT 4
- Mocking dosn't work when using absolut Urls HOT 1
- Parse FormData request HOT 1
- Can't seem to get anything from request.body with POST HOT 4
- Configuration with Next.js HOT 1
- generate JSON files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from connect-api-mocker.