Hi, Vicente ! You can solve cross origin setting a header in your server definition.
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
But if you want you can delegate that to a lib called "cors" that you can install: github.com/expressjs/cors#installa...
And that you can use simply by calling it as a Middleware.
var express = require('express')
var cors = require('cors')
var app = express()
It is important to remember that allowing cors without specifying a known domain could be dangerous since anyone would be able to reach your api, be careful and if you have any questions don't hesitate to ask :)
saludos, paisano !
Hey thanks man for some reason I was missing put my domain there, but now it's work fine.
Gracias por el support carnal =).
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.