Add grpc snippet
This commit is contained in:
parent
b48fc601a7
commit
d82612f699
1 changed files with 12 additions and 1 deletions
|
@ -8,7 +8,7 @@
|
||||||
"",
|
"",
|
||||||
"import { describe } from 'node:test'",
|
"import { describe } from 'node:test'",
|
||||||
"",
|
"",
|
||||||
"import { createDatabase, tearDown, withFixturesIt } from '@lib/database/test'",
|
"import { withFixturesIt } from '@lib/database/test'",
|
||||||
"import { createTestContext } from 'baseup/services/internal/engine/context/test'",
|
"import { createTestContext } from 'baseup/services/internal/engine/context/test'",
|
||||||
"",
|
"",
|
||||||
"import { expect, use } from 'chai'",
|
"import { expect, use } from 'chai'",
|
||||||
|
@ -31,5 +31,16 @@
|
||||||
" $0",
|
" $0",
|
||||||
"})"
|
"})"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"grpcimpl": {
|
||||||
|
"prefix": "grpcimpl",
|
||||||
|
"description": "gRPC implementation function",
|
||||||
|
"body": [
|
||||||
|
"import type Context from 'baseup/services/internal/engine/context'",
|
||||||
|
"",
|
||||||
|
"export async function ${1:endpointName}(ctx: Context) {",
|
||||||
|
" $0",
|
||||||
|
"}"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue