projectName | extensions |
---|---|
HTTP trigger project |
core,identity,hono,fly,postgresql |
export default project(
feature('Users', {
tables: {
users: table({
fields: {
name: field({ type: 'short-text' }),
email: field({ type: 'email' }),
},
}),
},
workflows: [
workflow('CreateUserWorkflow', {
tag: 'users',
trigger: trigger.http({
method: 'post',
path: '/',
}),
actions: {
createUser: action.database.insert({
table: useTable('users'),
columns: [
useField('name', '@trigger:body.name'),
useField('email', '@trigger:body.email'),
],
}),
},
}),
],
})
);