AutomaticDoorControl / AutoDoorCtrlWeb

The Website portion of the Automatic Door Control project.
https://rpiadc.com
MIT License
2 stars 1 forks source link

Use apiServer from globals.ts as a global variable for the API server #8

Closed bsakai2000 closed 5 years ago

bsakai2000 commented 5 years ago

API server is currently hardcoded in several places in several files as localhost:8080. This isn't good for use on a server because these API calls will occur on the client side which is (probably) not running the API server. I've created a file called globals.ts in /src/app which exports the string apiServer which should be set to the location and port of the API server. I've left it as "http://localhost:8080" for simplicity, but it can be easily changed to another ip or a domain name by just changing globals.ts instead of changing each file individually.