So I've made my backend application that is connected to a mongo database. This express backend is made with node and has a few API routes that handle CRUD methods. I'm trying to call these crud methods via my Vue.js front end. I'm doing this with methods on my component. It's telling me that I cannot reach it because of:The Same Origin Policy disallows reading the remote resource at https://localhost:3000/api/todos. (Reason: CORS request did not succeed)I've tried every tutorial I can see. I've installed cors package and read it thoroughly. I don't understand what I'm doing wrong. Is it not the express side? Is it the Vue side? I'm so confused about this. Here are the things that I've tried in my express app:- require cors()- set app.use(cors())- set app.options('route here', cors());- various tutorial header establishers.
Submitted January 08, 2019 at 07:29PM by randygbiv
No comments:
Post a Comment