DEV Community 👩‍💻👨‍💻

Discussion on: Nuxt3 + Express API

 
mihaiandrei97 profile image
Mihai-Adrian Andrei Author

You will need to add cors on your server. And specify localhost:8080 there.

Thread Thread
 
slidenerd profile image
slidenerd

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

Thread Thread
 
mihaiandrei97 profile image
Mihai-Adrian Andrei Author

Sure. I will make one. You want it with nuxt2 or nuxt3?

Thread Thread
 
slidenerd profile image
slidenerd

whatever you are comfortable with, if you could do nuxt 2 that would be great, if you want your article to have the future in mind nuxt 3, if there is not much difference between both,perhaps make a single article with 2 sections inside, super appreciated!

Thread Thread
 
mihaiandrei97 profile image
Mihai-Adrian Andrei Author

Hello. I created a repo that you can check here: github.com/mihaiandrei97/express_n...

Thread Thread
 
slidenerd profile image
slidenerd

extremely helpful!! just a curious question though, your nuxt config file says ssr false, does anything change if ssr is true

Thread Thread
 
mihaiandrei97 profile image
Mihai-Adrian Andrei Author

The deployment. If you choose ssr true, you need to deploy the app to a node server. If you choose ssr false, you can deploy it as static website to netlify for example.