-
nuxt.js set proxy interface |
Beta Was this translation helpful? Give feedback.
Answered by
hixb
Jul 15, 2022
Replies: 1 comment
-
`
deploy: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
xiao-ice
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
`
, install @gauseen/nuxt-proxy package dependencies
cnpm install @gauseen/nuxt-proxy --save
Modify modules to
modules: [
"@gauseen/nuxt-proxy"
]
proxyTable: {
"/api": {
target: 'https://xxxxx.com',
changeOrigin: true,
ws: false,
pathRewrite: {
"^/api": "/api"
}
}
}
deploy:
pm2 start npm --name "my-nuxt" --run start
`