RPC work
This commit is contained in:
4
packages/common/src/config/CommonConfig.ts
Normal file
4
packages/common/src/config/CommonConfig.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { Config } from "effect"
|
||||
|
||||
|
||||
export const webRpcHttpPath = Config.succeed("/rpc/web" as const)
|
||||
1
packages/common/src/config/index.ts
Normal file
1
packages/common/src/config/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * as CommonConfig from "./CommonConfig"
|
||||
4
packages/common/src/webrpc/WebRpc.ts
Normal file
4
packages/common/src/webrpc/WebRpc.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import * as WebRpcTest from "./WebRpcTest"
|
||||
|
||||
|
||||
export class WebRpc extends WebRpcTest.WebRpcTest {}
|
||||
11
packages/common/src/webrpc/WebRpcTest.ts
Normal file
11
packages/common/src/webrpc/WebRpcTest.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Rpc, RpcGroup } from "@effect/rpc"
|
||||
import { Schema } from "effect"
|
||||
|
||||
|
||||
export class PingV1 extends Rpc.make("Test.PingV1", {
|
||||
success: Schema.Literal("pong"),
|
||||
}) {}
|
||||
|
||||
export class WebRpcTest extends RpcGroup.make(
|
||||
PingV1,
|
||||
) {}
|
||||
2
packages/common/src/webrpc/index.ts
Normal file
2
packages/common/src/webrpc/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * as WebRpc from "./WebRpc"
|
||||
export * as WebRpcTest from "./WebRpcTest"
|
||||
Reference in New Issue
Block a user