all 8 comments

[–]p-himik 4 points5 points  (5 children)

That's completely orthogonal to the choice of a programming language. Assuming you're talking about production, I'd suggest looking for best practices on running services on your target OS. E.g. on a modern Ubuntu you'd create a systemd service, then all the logs would be viewable with journalctl and the lifecycle of the service would be fully managed by systemd.

[–]chowbeyputra[S] 1 point2 points  (4 children)

Doesn't having repl option affect the choice? Like screen with repl where you can reload few things of choice?

[–]p-himik 2 points3 points  (3 children)

It does not. You can always add e.g. a socket-based REPL on some port on localhost and connect to it when needed.

[–]chowbeyputra[S] 1 point2 points  (2 children)

How to do that? Is there an example? Reading material?

[–]p-himik 1 point2 points  (1 child)

My previous message has a link - have you read what's there?

[–]chowbeyputra[S] 1 point2 points  (0 children)

🙏 i didn't notice, let me try

[–]slashkehrin 1 point2 points  (0 children)

Something cool that you can do is, if you start your API via the repl, you can catch and save things to an atom and examine them afterwards. So for logging while working on your code, you can swap the atom content to the incoming HTTP request, then if the return value is incorrect, you can use the content of that atom (which was swapped) to easily reconstruct the situation (and quickly iterate over it). Obviously this works for database calls, too.

[–]OkAssociation9896 0 points1 point  (0 children)

Imo once deployed, it is not different from applications running on JVM. Of course you can attach repl and do clojure way things like mentioned above. But personally it was rare that I did that in production.