Migration for version 0.x
to 1.x
.
Simply change the routes
variable to the routes.tb
.
const api_config = {
//...
routes: [
{
table: 'animals', //<-- YOUR_TABLE_NAME
event: 'ANIMAL', //<-- YOUR_EVENT_NAME
methods: ['GET', 'POST', 'PUT', 'DELETE'], //<-- YOUR_METHODS
//Used only by methods 'POST' and 'PUT'
columns: [
{name: 'id', primary: true},
{name: 'name'}
]
}
]
}
const api_config = {
//...
routes: {
tb: [
{
table: 'animals', //<-- YOUR_TABLE_NAME
event: 'ANIMAL', //<-- YOUR_EVENT_NAME
methods: ['GET', 'POST', 'PUT', 'DELETE'], //<-- YOUR_METHODS
//Used only by methods 'POST' and 'PUT'
columns: [
{name: 'id', primary: true},
{name: 'name'}
]
}
]
}
}
Licensed under the MIT license.