haskell-servant / haskell-servant/servant-js

Provide URL Prefix as JS function argument

Open
#2 3 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Haskell
Stars
23
Forks
22
PR merge metrics
No merged PRs in 30d

Description

I'm writing a server which isn't necessarily accessed from a browser front end or on the same domain as the server itself. Because of this, it would be necessary to provide the address of the server as an additional argument to the generated javascript functions as so:

``` javascript
var getX = function( onSuccess
, onError
, serverAddress) // The additional server address argument
{
// ...
xhr.open('GET'
, serverAddress + '/x' // Preappend the server address to the route
, true);
// ...
}
```

But I've not found an option to do so that's not generating and modifying the API by hand constantly.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.