LinuxSuRen/api-testing

The frontend project behaves differently across different environments.

shiyang1026 opened this issue · 1 comments

The behavior of running the frontend project locally with npm run dev differs from running it in Docker.
In the Docker environment, all functionalities operate as expected, when running the frontend project locally, the following functionalities are not available:

  • The Query, Header, and Cookie fields of the TestCase.
  • Code generation functionality.

image

I encountered this issue on different operating systems, including Linux and Windows, which necessitated rebuilding the Dockerfile for debugging, I haven't worked with frontend before, so I haven't been able to pinpoint the issue yet.

On a side note, while running npm run dev on Windows, I encountered a "vite HTTP proxy error".

image
The solution was to modify the proxy rules in vite.config.ts. If the proxy rule is set to localhost, it should be changed to the local machine address (127.0.0.1), and vice versa. —— from vitejs/vite#7620

image

Running ./api-testing server without providing the necessary parameters caused some errors during YAML parsing on the server side. In any case, simply running make run-server directly will suffice. I hadn't noticed the Makefile file before.