Setup a REST API to serve your data easily.
config := &Config {
// The defined routes will be prefixed with this root.
Root: "/api/v1",
Schema: []*Schema{
{
Name: "Users",
// Plug in the data provider for the "Users" dataset
// here so that the REST API knows how to access the data
// to be served.
// Read below for data providers for your persistent storage solution.
Provider: users_data_provider,
},
// ... define more shemas to be served by the REST API
},
}
err := InitEasyApi(config)
// TODO: Put example of plugging in the api router.
- MySQL Data Provider: Configure to serve data from your MySQL database.