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

Lite-server : how to integrate proxy.config information into bs-config.json #170

Open
joannluo66 opened this issue Feb 4, 2020 · 4 comments

Comments

@joannluo66
Copy link

This is a question rather than an issue.

I am developing a client application using Lite-server. In order to access the backend API I need to set up the proxy config so I don't run into the CORS issue. I have a bs-config.json that has port and server information set up. I want to know how I can integrate the prox-config information into the bs-config.json. Do I really need to create a separate bs.config.js? Or should I somehow pass into two config files the commands in the package.json where I have "lite-server -c bs.config.json"? Thanks a lot! Below is a sample proxy.conf.json file but I am using Lite-server so I don't see a way to pass in this configuration in the package.json.

{
"/api": {
"target": "http://npmjs.org",
"secure": false,
"pathRewrite": {
"^/api": ""
},
"changeOrigin": true
}
}

@sechouaya
Copy link

upppppp

@sechouaya
Copy link

upppppppppp

@sechouaya
Copy link

uppppppppppppppppp

@ytilis
Copy link

ytilis commented Mar 2, 2020

https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/servers.md#lite-server

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

3 participants