Nuxt3 + Express API Mihai-Adrian Andrei on December 15, 2021 So, a while ago I needed this integration for a personal project, and of course I used the all mighty Google, but could not find any step by step t... Read full post Submit Preview Dismiss Collapse Expand Lee_Moon Lee_Moon Lee_Moon Follow Joined Jun 7, 2024 • Jun 7 '24 Dropdown menu Copy link Hide Now, in nuxt3 serverMiddleware has been replaced with serverHandlers! Thank you very much for this article,it really helps me a lot! like: serverHandlers: [ { route: '/apis', handler: '~/server-express/index.ts' } ], Collapse Expand Benandy Benandy Benandy Follow Joined Aug 2, 2024 • Sep 12 '24 • Edited on Sep 12 • Edited Dropdown menu Copy link Hide Can you send link how it's integrate? Collapse Expand slidenerd slidenerd slidenerd Follow we didnt start the fire, it was always burning since the world's been turning... Location India Joined May 25, 2019 • Jan 8 '22 Dropdown menu Copy link Hide what if I have a separate project as backend and another one with nuxt as frontend and want to connect both of them? Collapse Expand Mihai-Adrian Andrei Mihai-Adrian Andrei Mihai-Adrian Andrei Follow I'm a Full Stack developer. I mostly use with Next/Remix or Sveltekit. I also like working with Python so you will find some diverse content here. Location Romania Joined Dec 15, 2021 • Jan 8 '22 Dropdown menu Copy link Hide You can just just make http calls from nuxt to your server ( using axios ). Collapse Expand slidenerd slidenerd slidenerd Follow we didnt start the fire, it was always burning since the world's been turning... Location India Joined May 25, 2019 • Jan 9 '22 Dropdown menu Copy link Hide interesting but wont that create a problem? your nuxt frontend will be running on localhost:8080 while your backend runs on say localhost:3000 Mihai-Adrian Andrei Mihai-Adrian Andrei Mihai-Adrian Andrei Follow I'm a Full Stack developer. I mostly use with Next/Remix or Sveltekit. I also like working with Python so you will find some diverse content here. Location Romania Joined Dec 15, 2021 • Jan 9 '22 Dropdown menu Copy link Hide You will need to add cors on your server. And specify localhost:8080 there. slidenerd slidenerd slidenerd Follow we didnt start the fire, it was always burning since the world's been turning... Location India Joined May 25, 2019 • Jan 9 '22 Dropdown menu Copy link Hide if it isnt too much to ask, could you kindly add another nuxt + express api article but this time show how cors is done, your current article wouldnt need much changes from what i understand Mihai-Adrian Andrei Mihai-Adrian Andrei Mihai-Adrian Andrei Follow I'm a Full Stack developer. I mostly use with Next/Remix or Sveltekit. I also like working with Python so you will find some diverse content here. Location Romania Joined Dec 15, 2021 • Jan 9 '22 Dropdown menu Copy link Hide Sure. I will make one. You want it with nuxt2 or nuxt3? Collapse Expand Jacky supit Jacky supit Jacky supit Follow Joined Oct 25, 2022 • Oct 25 '22 Dropdown menu Copy link Hide oh wow, thank you!!! you have no idea how this save my head from this hours headache :') Collapse Expand slidenerd slidenerd slidenerd Follow we didnt start the fire, it was always burning since the world's been turning... Location India Joined May 25, 2019 • Jan 14 '22 Dropdown menu Copy link Hide also on your profile you misspelled Python :) by mistake Collapse Expand Mihai-Adrian Andrei Mihai-Adrian Andrei Mihai-Adrian Andrei Follow I'm a Full Stack developer. I mostly use with Next/Remix or Sveltekit. I also like working with Python so you will find some diverse content here. Location Romania Joined Dec 15, 2021 • Jan 14 '22 Dropdown menu Copy link Hide Thanks :D Collapse Expand laxman16in laxman16in laxman16in Follow Joined Jul 5, 2023 • Jul 5 '23 Dropdown menu Copy link Hide getting 404 page not found Collapse Expand JiHua JiHua JiHua Follow Joined Sep 25, 2023 • Sep 25 '23 Dropdown menu Copy link Hide me too Collapse Expand Daniel KJ Coles Daniel KJ Coles Daniel KJ Coles Follow Joined May 24, 2022 • May 24 '22 Dropdown menu Copy link Hide Awesome, thanks for this! Code of Conduct • Report abuse
Now, in nuxt3 serverMiddleware has been replaced with serverHandlers!
Thank you very much for this article,it really helps me a lot!
like: serverHandlers: [
{ route: '/apis', handler: '~/server-express/index.ts' }
],
Can you send link how it's integrate?
what if I have a separate project as backend and another one with nuxt as frontend and want to connect both of them?
You can just just make http calls from nuxt to your server ( using axios ).
interesting but wont that create a problem? your nuxt frontend will be running on localhost:8080 while your backend runs on say localhost:3000
You will need to add cors on your server. And specify localhost:8080 there.
if it isnt too much to ask, could you kindly add another nuxt + express api article but this time show how cors is done, your current article wouldnt need much changes from what i understand
Sure. I will make one. You want it with nuxt2 or nuxt3?
oh wow, thank you!!! you have no idea how this save my head from this hours headache :')
also on your profile you misspelled Python :) by mistake
Thanks :D
getting 404 page not found
me too
Awesome, thanks for this!