
Ask HN: Should I run an API and client on the same server? - NetOpWibby
Forgive my ignorance, I only work with an internal API at work and I interface with it on different servers via authentication.<p>I found this repo (https:&#x2F;&#x2F;github.com&#x2F;miguelgrinberg&#x2F;REST-tutorial) and the code creates a Python server for delivering a REST API. It looks like the client is designed to run on the same server this API would be on.<p>So, what are your recommendations? I want to release some apps this year, and two of them rely on an API that I will learn how to write.
======
mod
It's fine to do that, just compose them in a way where it wouldn't matter if
it were another server.

That way it's easier to migrate off later, if needed, and easier to scale as
well.

~~~
NetOpWibby
Hmm, okay. Thanks!

------
mtmail
rest-server.py uses the flask framework which just happens to default to
localhost:5000. You can run it on any IP address or domain, see
[http://flask.pocoo.org/docs/0.10/deploying/#deployment](http://flask.pocoo.org/docs/0.10/deploying/#deployment)

Questions of the kind "how to I do X in programming language Y" are better
answered on stackoverflow.

~~~
NetOpWibby
SO was actually my initial thought, but I seem to get a bunch of downvotes on
those kinds of questions, and comments telling me to go to some other
StackExchange site to ask that question.

Thanks for your response though!

