Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TrackJS tries to post the errors to localhost #3

Closed
slorber opened this issue Feb 20, 2015 · 3 comments
Closed

TrackJS tries to post the errors to localhost #3

slorber opened this issue Feb 20, 2015 · 3 comments

Comments

@slorber
Copy link

slorber commented Feb 20, 2015

When running my app locally, I got TrackJs working in a browserify bundled file by setting token before init and by using the global variable. (see #2)

But then when I call trackJs.track("test") it tries to post the error to localhost, resulting in an error.
My server is localhost:9000, but the served html page for my SPA has a head base url = localhost:8080. I don't know at all why TrackJs would use this url instead of an hardcoded url to your API

POST -> http://localhost:8080/?token=mytoken

@slorber
Copy link
Author

slorber commented Feb 20, 2015

Actually it seems to work better since I now load my bundle with crossorigin attribute.
You may document that, and also recommend https://github.com/nodeapps/http-server as it's a simple http server in command line that support cors (useful for SPA devlopment)

@slorber
Copy link
Author

slorber commented Feb 20, 2015

Now I see an error being posted at https://capture.trackjs.com/capture?token=token

code is 200 but the error is not displayed in the dashboard

@slorber
Copy link
Author

slorber commented Feb 20, 2015

Humm sorry it now does, a bit later...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants