Reputation: 21
export default {
root:'./',
server: {
host: '0.0.0.0',
port: 8080,
open: true,
proxy: {
'/dev': 'http://localhost:6806'
}
}
}
I am a green hand. After npm run dev
, the server is still running on the 3000, and the request on the developer tools is:
POST http://localhost:3000/dev/api/query/sql 404 (Not Found)
The true result should be localhost:6806, right?
//package.json
...
"scripts": {
"dev": "vite",
"build": "vite build"
},
...
Both files are in the root directory
Upvotes: 1
Views: 290
Reputation: 21
My Vite version is 1.x
But the document that I read is for Vite 2.0.
Just upgrade Vite.
Upvotes: 1