string/apiPlease refer to the Enable BFF section in Basic Usage to enable BFF functionality first.
By default, the prefix for accessing routes in the BFF API directory is /api, as shown in the following directory structure:
api
└── hello.tsThe route corresponding to api/hello.ts when accessed is localhost:8080/api/hello.
This configuration option can modify the default route prefix:
export default defineConfig({
bff: {
prefix: '/api-demo',
},
});The corresponding route for api/hello.ts when accessed is localhost:8080/api-demo/hello.