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

Spotbit website #22

Open
watersnake1 opened this issue Sep 20, 2020 · 1 comment
Open

Spotbit website #22

watersnake1 opened this issue Sep 20, 2020 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@watersnake1
Copy link
Collaborator

Blockchain commons currently controls the domain spotbit.info, but it is only set up to simply redirect to the github repo page. Eventually Spotbit will need a proper website, including all documentation, a list of servers available, an icon / logo of some sort, and an FAQ.

A simple github pages site would be a good solution for this.

Potential future intern side project?

@watersnake1 watersnake1 added the help wanted Extra attention is needed label Sep 20, 2020
@javiervargas
Copy link
Contributor

I've created two things. On the one hand, a javascript script that uses ajax to read the spotbit now api every 15 seconds and update the graph. On the other, a very simple proxy script in PHP that masks access to port 5000 and returns the json output. Due spotbit runs on http and port 5000 when I try to access API I get an error by CORS policy.

Error: (Access to fetch at from origin 'http://localhost' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.)

I've tried using no-cors option on ajax api call or adding this rule (Header add Access-Control-Allow-Origin ) on .htaccess file without success. Meanwhile I've opted by create the simple proxy script that mask the port and returns the json output.

If later spotbit can be accessed by WebSocket we just have to modify a few javascript lines and draw the charts.
Other option could be run spotbit on https and the call to the api will work even it is listening on 5000.

@gorazdko gorazdko mentioned this issue Jan 7, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants