Frontend & Backend in one Deno Deploy project

I have a Nuxt 3 frontend and an Oak backend. Is it technically possible to deploy both in one deno deploy project? And if so, how can I achieve that? Thanks for helping! <:sushi_deno:1002977518833381396>
DAHDeno AI Helper11/6/2023
The documentation does not provide a specific example or guide on deploying a Nuxt 3 frontend and an Oak backend together in one Deno Deploy project. However, it does provide separate guides on deploying web applications and using Oak. In general, Deno Deploy is designed to run JavaScript, TypeScript, and WebAssembly at the edge, worldwide. It supports built-in TypeScript and JSX, ES modules, and has direct GitHub integration. For deploying a Vite Deno and React app, the documentation suggests using the GitHub Actions mode of the GitHub integration, which allows you to perform a build step before deploying. This might be applicable to your Nuxt 3 frontend. For the Oak backend, the documentation provides an example of how to use Oak in Deno, and also mentions the possibility of publishing Oak to NPM in a way that it is usable in Node.js. However, combining these two in one Deno Deploy project is not explicitly covered in the documentation. It might be possible to achieve this by creating a main server file that serves both the frontend and the backend, but this is not explicitly supported or recommended by the documentation. I would recommend deploying the frontend and backend as separate Deno Deploy projects. This would allow you to manage and scale them independently, which can be beneficial in a microservices architecture. Remember to always test your deployments thoroughly to ensure they work as expected. 🦕
Have two folder at the root of your git repository ./backend/ ./frontend/ Can also be named client and server. Simple.
But what would I set the entry_point to? The Nuxt frontend has its entry point at frontend/output/server/index.ts and the backend has it at backend/app.ts Got it to work. I am copying the frontend static files over to the backend folder after the frontend build. Then I am serving the static assets with Oak's send() method. -> only one entry_point in the backend needed then

Looking for more? Join the community!

Recommended Posts
Is there a split_to_array function like join_to_stringI need to split a string with some delimiter `=[, ` and ask my self if there is something in deno whHow to set proxy to overall all requests coming from application?In Node JS, we can `import https` and set `https.proxy = "proxyDetails` However, I couldn't find a wOverload not typing object literalsshouldn’t only “real” show up as a property here? if not, how could I achieve that?Making Post Request To HubSpot ApiHi there I'm trying to make a post request to the HubSpot Api. However the request results in a "HubCLI prompt consistent with Deno CLII want to make outputs of my CLI tools look consistent with Deno CLI. Is there a rust crate to do thcannot set property on fetch responsein the browser this works ```javascript let o = await fetch('https://deno.com'); o.asdf = 2 console.Component testing with DenoI've run through a zillion possible setups with Deno and I'm still struggling to understand exactly Is there any way to run deno as a cluster on one machine? (like pm2)I plan to service with deno, but PM2 does NOT support deno. Is there any way to run deno as a clusthow to set remoteAddr from http header Forwarded for or X-Forwarded forIn some environments are the TCP Client IP not the real Client IP. What's the best way to set https:FFI: How to pass a pointer to a char pointer?How can I pass a pointer to a char pointer in order to use the C function below via FFI? ```c my_funDeno.serve().shutdown doesn't exist?```ts const server = Deno.serve({ hostname, port, }) server.shutdown() ``` ``` error: TS2339 [EDeno deploy see errorHow can i see the error why my build failed? It just returned `Error An internal server error occurr