You can use List Express API to link the client UI(especially editors like Select or SuggestBox with remote data source) and sever data model.
List Express API helps to perform the next requests:
|GET||/||Get all records|
|GET||/label/:recordId||Get particular record label|
Specify a list model which must implement List Model Interface and can be an instance or a constructor so that the List Express Api will be able to use the provided data model to perform client requests.
|FormModel||listModel||Required. The instance of a List model|
|Function||getModel||Required. Function to be called with Express middleware’s
Specify a function to be called when the response is ready.
|Function||callback||Optional. Function to be called with the result.|
|Any||err||Error caught from model methods|
|Any||data||Result returned by model methods|
Creates an Express router object with middlewares performing requests specified above.
Pass a model instance to Express API:
Or use a constructor for that:
You can also customize your API by adding other methods or define API using other frameworks.
To interact with this API at front-end use List XHR Model.