thrift-ios-nodejs-example:使用 Thrift 连接到 NodeJs 服务器的示例 iOS 客户端

时间:2021-06-04 00:53:11
【文件属性】:
文件名称:thrift-ios-nodejs-example:使用 Thrift 连接到 NodeJs 服务器的示例 iOS 客户端
文件大小:30KB
文件格式:ZIP
更新时间:2021-06-04 00:53:11
Objective-C iOS 上的节俭 从 iOS 应用程序访问 API 的示例。 构建接口 每当您更改 Thrift 接口定义时,您都需要为您使用的语言更新生成的代码。 在我们的例子中,我们想要构建 NodeJS 和 Cocoa 绑定: thrift -o client/ThriftTest --gen cocoa thrift/messaging-service.thrift thrift -o server --gen js:node thrift/messaging-service.thrift 您通常可能不想对生成的代码进行版本控制,而是在构建/编译时生成它。 该代码包含在此处以快速参考它的外观。 运行服务器 运行服务器: cd server npm install npm start 如果您好奇,还有一个基于 NodeJs 的客户端,您可以通过简单地运行npm run client来试用
【文件预览】:
thrift-ios-nodejs-example-master
----client()
--------ThriftTest()
--------ThriftTest.xcodeproj()
--------Podfile.lock(138B)
--------ThriftTest.xcworkspace()
--------Podfile(65B)
----.gitignore(519B)
----server()
--------client.js(1023B)
--------package.json(268B)
--------lib()
--------server.js(171B)
--------gen-nodejs()
----README.md(1009B)
----thrift()
--------MessagingService.thrift(511B)
----compileInterfaces.sh(145B)

网友评论