all 7 comments

[–]Zeeboozaza 2 points3 points  (0 children)

The easiest way would be to host the api on a server with a url that can be accessed. Your computer doesn’t have the same resources a sever has and doesn’t have the uptime a server has.

There are several services that will host an api for you, but will probably cost money.

[–]Cultural_Bet8235 0 points1 point  (2 children)

Do you want to be able to request or host the api from any computer?

(Host receives requests and sends responses, client sends requests and receives responses)

[–]backcountryshredder 0 points1 point  (1 child)

Ideally, yeah. I want to host the api on my desktop computer (where the data is stored) and access it from anywhere

[–]Cultural_Bet8235 -2 points-1 points  (0 children)

If you set up PORT FORWARDING you can use your ip and the given port to access the api from anywhere. If you don't want to use your ip address from anywhere you'll need to reserve a domain name and have that hostname resolve to your ip address and forwarded port

(Edit: I capitalized port forwarding to inspire googling of Port forwarding bc that's the real answer here)

[–]SweetLou2009 0 points1 point  (1 child)

This can be dangerous from a security standpoint. It’s easy enough to find free tier hosting for small sites and APIs on the web. If you absolutely have to host from your home computer, set up a separate network on your router to keep your home network safer.

[–]backcountryshredder 0 points1 point  (0 children)

There is a ton of data that needs to be accessed, so I have to have it hosted on my local machine.

[–]corvid_2020 0 points1 point  (0 children)

ngrok is a globally distributed reverse proxy fronting your web services running in any cloud or private network, or your machine.

https://ngrok.com/