for example, the front and rear separation project vue + axios + koa2 + java (springboot) uses restful style api
question:
- what role does koa2 play? Specifically, what code should be written in koa2? Under the
- vue+koa2 front-end combination, where should the route be written? Vue-router? Koa? Koa-router? What is the point of writing routing twice in vue and koa2?
- someone said that in a scenario, the backend usually does not wrap the data according to the front-end display field, but throws it over, and then disassembles and integrates it with koa2, showing to vue, is this a reason for the existence of koa2?
- generate a project with vue-cli, in fact, you can achieve the front-end requirements, including node server, webpack, etc., so the extreme point: add axios is fine, koa2 is useless.
ask the boss to solve the problem, thank you.