Initial version (#1)
Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Reviewed-on: #1
This commit was merged in pull request #1.
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"
|
||||
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,
|
||||
) {}
|
||||
10
packages/common/src/webrpc/index.ts
Normal file
10
packages/common/src/webrpc/index.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { RpcSerialization } from "@effect/rpc"
|
||||
import * as WebRpcTest from "./WebRpcTest"
|
||||
|
||||
|
||||
export class WebRpc extends WebRpcTest.WebRpcTest {}
|
||||
|
||||
export const WebRpcSerializationDevelopment = RpcSerialization.layerJson
|
||||
export const WebRpcSerializationProduction = RpcSerialization.layerNdjson
|
||||
|
||||
export * as WebRpcTest from "./WebRpcTest"
|
||||
Reference in New Issue
Block a user