diff --git a/backend/main.ts b/backend/main.ts index cd6e1db..81dd7da 100644 --- a/backend/main.ts +++ b/backend/main.ts @@ -1,6 +1,7 @@ // backend/main.ts /// +import { NodeAdapter } from '@nailyjs/backend/node-adapter' import { RpcBootstrap } from '@nailyjs/rpc' import './welcome-server' @@ -8,6 +9,7 @@ import './welcome-server' // you also can configure your export key in the plugin options. export const app = new RpcBootstrap() .setBaseURL('/rpc') + .setBackendAdapter(NodeAdapter) // It will be called when environment is production mode if (import.meta.env.PROD) diff --git a/vite.config.ts b/vite.config.ts index 417755d..738a500 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -27,6 +27,10 @@ export default defineConfig({ }, }, + build: { + outDir: './dist/frontend', + }, + plugins: [ Rpc({ buildOnViteCloseBundle: false,