I have used postgRest to enable data requests from an Elm SPA application to a postgreSQL backend.
PostgRest is a warp web server application written in Haskell that exposes an API to postgreSQL. Elm fetches postgreSQL data via an endpoint using the HTTP module and, as long as postgRest has been configured to recognize the application and the postgRest application has been granted the necessary postgreSQL privileges, the data is retrieved from postgreSQL by postgRest and served to Elm.
This simple model might be all one needs in some use cases.
No comments:
Post a Comment