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

Usage #65

Closed
michaelwmason opened this issue Mar 3, 2019 · 1 comment
Closed

Usage #65

michaelwmason opened this issue Mar 3, 2019 · 1 comment

Comments

@michaelwmason
Copy link

michaelwmason commented Mar 3, 2019

How is this supposed to be used? If it is an npm package that would lead me to believe I could use it with my Angular application. What is its intended use if it can't be used in the browser? Could I deploy this on a server and use it as middleware for the endpoints?

@bttmly
Copy link
Owner

bttmly commented Mar 4, 2019

This is meant to be used on the server with Node.js. You can also use it to scrape data from NBA and populate a database. For what it's worth, what prevents browser use is the browser security model (CORS specifically).

There is a very simple, minimal implementation of using this package to proxy requests from the browser to the NBA's API: https://github.com/bttmly/nba/blob/master/scripts/proxy.js

@bttmly bttmly closed this as completed Mar 12, 2019
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