Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
9eb077c4
Commit
9eb077c4
authored
Sep 17, 2023
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update service clients
parent
6eeee6b7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
grpcweb.ts
web/src/grpcweb.ts
+12
-0
No files found.
web/src/grpcweb.ts
View file @
9eb077c4
import
{
createChannel
,
createClientFactory
,
FetchTransport
}
from
"nice-grpc-web"
;
import
{
MemoServiceDefinition
}
from
"./types/proto/api/v2/memo_service"
;
import
{
ResourceServiceDefinition
}
from
"./types/proto/api/v2/resource_service"
;
import
{
SystemServiceDefinition
}
from
"./types/proto/api/v2/system_service"
;
import
{
TagServiceDefinition
}
from
"./types/proto/api/v2/tag_service"
;
import
{
UserServiceDefinition
}
from
"./types/proto/api/v2/user_service"
;
const
address
=
import
.
meta
.
env
.
MODE
===
"development"
?
"http://localhost:8081"
:
window
.
location
.
origin
;
...
...
@@ -13,3 +17,11 @@ const channel = createChannel(
const
clientFactory
=
createClientFactory
();
export
const
userServiceClient
=
clientFactory
.
create
(
UserServiceDefinition
,
channel
);
export
const
memoServiceClient
=
clientFactory
.
create
(
MemoServiceDefinition
,
channel
);
export
const
resourceServiceClient
=
clientFactory
.
create
(
ResourceServiceDefinition
,
channel
);
export
const
systemServiceClient
=
clientFactory
.
create
(
SystemServiceDefinition
,
channel
);
export
const
tagServiceClient
=
clientFactory
.
create
(
TagServiceDefinition
,
channel
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment