nerdydrew / Random-Pokemon-Generator

Source code for randompokemon.com
https://randompokemon.com
GNU General Public License v2.0
86 stars 29 forks source link

Suggestion: API #3

Closed ProtoCh4os closed 3 years ago

ProtoCh4os commented 3 years ago

Possibly make a RestFul API to get a random Pokemon

Blackstareye commented 3 years ago

I am working on a solution.

The issue is, that there is no backend at all so far, because it was intended as a standalone little js application (as far as I can see that).

@nerdydrew Would you be okay with having a backend like nodejs? I also made a wip pull request :)

Question: I saw, that the webpage is located on a aws. Does AWS allow nodejs ?

nerdydrew commented 3 years ago

I host Random Pokémon Generator as a static website (front-end only) on Amazon S3. I originally used a back-end server, but that was getting expensive as my site received more traffic. I don't mind if someone else hosts the API, but I'd rather not host it myself.

Blackstareye commented 3 years ago

@nerdydrew

I see. If it is okay from your side, I would run a few tests and if it is still also usuable as a static website (without api), is it okay, to merge the REST API into your project as well ?

nerdydrew commented 3 years ago

I'd rather not so that I don't have to maintain it.

Blackstareye commented 3 years ago

@nerdydrew Understandable.

Then I would maintain the fork with the REST API. Would you mind, adding a little note to your readme, that the API Part is on that fork?

And Thanks for your quick response.

nerdydrew commented 3 years ago

Sure, I just added a link to the README.