-1

I've been working on a project recently where I have an Expressjs server that supplies weather forecast data to its clients. Right now, I'm using express simply as a means of exposing some functions I have on the server. Here are some of my endpoints:

GET /web/getFullForecast

GET /web/getCurrentForecast

As you can see, the API is not REST but rather more RPC style.

Is it considered bad practice to use the express framework simply as a means of doing RPC? Would I be better served using some kind of RPC framework for this?

closed as off-topic by gnat, Jörg W Mittag, BobDalgleish, Bart van Ingen Schenau, Laiv Mar 12 at 9:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to find or recommend tools, libraries, programming languages, resources (including books, blogs, tutorials, and examples), or projects to undertake are off-topic here as they attract opinionated answers that won't have lasting value to others. You may be able to get help in The Whiteboard, our chat room." – gnat, Jörg W Mittag, BobDalgleish, Laiv
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Why do you consider this RPC, not REST? What about it would make you think it's not a good match for Express? – jfriend00 Feb 24 at 1:54
1

Having a short look into the ExpressJS docs about routing, I cannot find any recommendation for or against using a RESTful style. On the contrary, there seem to be no restrictions imposed by the framework on how to choose URIs. So if the framework serves you well, don't overthink this.

Not the answer you're looking for? Browse other questions tagged or ask your own question.