Fork me on GitHub
#off-topic
<
2018-07-25
>
orestis06:07:58

I’ve inherited a legacy REST API that’s largely undocumented, but I also have the accompanying legacy web app that consumes it. I’d like to document and specify that API so I can start writing tests and changing implementations etc. I was looking around for tools to help with that, but couldn’t find any.

orestis06:07:59

I was thinking of putting a proxy between client and server, which would let requests pass through but also log them so then I can look for similarities etc, and generate some crude spec from it. Does that sound reasonable?

valtteri07:07:25

Why not just add logging to the server? (or client)

orestis07:07:56

The amount of spaghetti code in both codebases is a thing to marvel at. I’d rather treat them both as black boxes to begin with.

orestis07:07:31

Also, the major issue the org is having is lack of an explicit contract between client and server.

orestis07:07:25

(This is a node/mongo/jquery combo that is 5 years old - it’s not a platform I want to touch... yet)

orestis07:07:12

I was thinking I’d setup this proxy, click around in the website, dump everything into a huge edn file and then use Clojure to explore the data interactively.

valtteri08:07:11

I see, maybe non-intrusive observing is the best approach then. 🙂 I’ve used this with Node to capture HTTP-calls. It can also output them as data (JSON). It may or may not be useful in your case. https://github.com/nock/nock#recording

orestis08:07:23

Ah, mocking is a good keyword to search for. Thanks!

henrik09:07:14

For PR reasons, I believe we should rename functions to “nanoservices.”

😆 12
val_waeselynck17:07:18

Or, you know, "milli-lambdas".

borkdude19:07:29

Anyone here by any chance doing the exercises from HaskellBook?

sundarj19:07:39

are you in the FP discord? might try there

borkdude19:07:21

nope. link?

borkdude09:07:57

It turned out to be a mistake in the book I bumped into

hubert19:07:32

@victor.cleja Yeah, I thought that Gradle is more popular

cvic19:07:08

Gradle can be intimidating.

hubert19:07:21

I think Gradle is great, you can use plain Java in Groovy, I've never tried sbt (https://www.scala-sbt.org/)

hubert19:07:00

but sbt landed in "other" I guess