It helps if you add more details when you ask questions. I assume you are trying to get keycloak.js to work as you're dealing with CORS. To get that to work you need to create a client in Keycloak then set the following values:
* Access type: public
* Web Origins - once you've clicked save this field pops up, make sure it has the origin of your application (this is what enables cors requests, if you don't know what that is google it). The origin is url schema, hostname and port bit, without context path (so
http://localhost:8080 for example)