From b00168e317183f0df58d339dbe1a61e93dd1573c Mon Sep 17 00:00:00 2001 From: ToonoW Date: Sat, 7 Jan 2017 20:51:32 +0800 Subject: [PATCH 1/3] Create README.zh_CN.md Add Chinese version README. --- README.zh_CN.md | 103 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 README.zh_CN.md diff --git a/README.zh_CN.md b/README.zh_CN.md new file mode 100644 index 0000000..be3867a --- /dev/null +++ b/README.zh_CN.md @@ -0,0 +1,103 @@ +# Perfect Sessions (会话)示例,SQLite 驱动 [English](README.md) + +

+ + + Get Involed with Perfect! + + +

+ +

+ + + Star Perfect On Github + + + Stack Overflow + + + Follow Perfect on Twitter + + + Join the Perfect Slack + + +

+ +

+ + + Swift 3.0 + + + Platforms OS X | Linux + + + License Apache + + + PerfectlySoft Twitter + + + Slack Status + + +

+ + + +这个例子将会向你展示通过 SQLite 驱动的 Perfect Sessions 的使用方法。 + +## 运行环境 + +这个项目的主分支当前可以在 Xcode 8.1 和 Ubuntu 上的 Swift 3.0.1 工具链上编译运行。 + +## 编译与运行 + +这个示例项目的 Session 设置了10s 的过期时间,如果在这段时间内 Session 被使用,将会重置 Session 的过期时间为10s。 + +Session ID 和会话数据将会被展示在页面上。刷新页面会看到随机产生的数据添加到会话数据中。如果等待超过10s 才刷新一次页面,在页面上看到的将会是另一个 Session,会有不一样的 Session ID。 + +### Xcode + +我们建议用 [Perfect Assistant](http://perfect.org/en/assistant/) 管理 Swift 服务端项目。 + +在 Perfect Assistant 中点击“Create New Project”,然后选择“Custom repository URL”。选择放置项目的本地目录,然后在“Repository URL”输入:`https://github.com/PerfectExamples/Perfect-Session-SQLite-Demo.git` + +等待项目创建好了之后,点击"Build > Local"。Perfect Assistant 就会为你下载好所有依赖和创建一个 Xcode 项目。 + +打开 Xcode 项目工程文件,然后在运行按钮旁选择"Executable"。 + +然后,运行项目。 + +### 终端 + +下面的命令会克隆和编译示例项目,并且启动绑定8181端口的服务程序。 + +``` +git clone https://github.com/PerfectExamples/Perfect-Session-SQLite-Demo.git +cd Perfect-Session-SQLite-Demo +swift build +.build/debug/Perfect-Session-SQLite-Demo +``` + +你应该会看到以下的输出: + +``` +Starting HTTP server on 0.0.0.0:8181 with document root ./webroot +``` + +这段输出代表着服务器正常运作,并且等待着访问。访问 [http://localhost:8181/](http://127.0.0.1:8181/) 会看到欢迎语。按快捷键`control-c`可以终止服务器程序。 + +## Issues + +我们正在逐步过渡到 JIRA 来接收 Bug 的报告和 Issues,而之前使用的 GitHub issues 将会被弃用。 + +如果你发现错误或者有其他有用的建议,那么请在将它们贴在 [http://jira.perfect.org:8080/servicedesk/customer/portal/1](http://jira.perfect.org:8080/servicedesk/customer/portal/1) + +全部正在开启状态的 Issues 都在[这里](http://jira.perfect.org:8080/projects/ISS/issues)。 + +## 更多 + +有关 Perfect 项目更详细更全面的资料都在 [perfect.org](http://perfect.org/)。 From ee6fae4a988f110a8169c4f76a4d5e68aaebb6e2 Mon Sep 17 00:00:00 2001 From: ToonoW Date: Sat, 7 Jan 2017 20:54:01 +0800 Subject: [PATCH 2/3] Add Chinese version README link. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3fa9d2a..57a08ba 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Perfect Sessions Demo, SQLite Driver +# Perfect Sessions Demo, SQLite Driver [简体中文](README.zh_CN.md)

From ec232dbd5d06366d1b7c37089a36b24a5c7ea431 Mon Sep 17 00:00:00 2001 From: ToonoW Date: Sat, 7 Jan 2017 20:56:01 +0800 Subject: [PATCH 3/3] modify titles name --- README.zh_CN.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.zh_CN.md b/README.zh_CN.md index be3867a..d055a91 100644 --- a/README.zh_CN.md +++ b/README.zh_CN.md @@ -59,7 +59,7 @@ Session ID 和会话数据将会被展示在页面上。刷新页面会看到随机产生的数据添加到会话数据中。如果等待超过10s 才刷新一次页面,在页面上看到的将会是另一个 Session,会有不一样的 Session ID。 -### Xcode +### 准备工作 - 使用 Xcode 我们建议用 [Perfect Assistant](http://perfect.org/en/assistant/) 管理 Swift 服务端项目。 @@ -71,7 +71,7 @@ Session ID 和会话数据将会被展示在页面上。刷新页面会看到随 然后,运行项目。 -### 终端 +### 准备工作 - 使用终端 下面的命令会克隆和编译示例项目,并且启动绑定8181端口的服务程序。 @@ -90,7 +90,7 @@ Starting HTTP server on 0.0.0.0:8181 with document root ./webroot 这段输出代表着服务器正常运作,并且等待着访问。访问 [http://localhost:8181/](http://127.0.0.1:8181/) 会看到欢迎语。按快捷键`control-c`可以终止服务器程序。 -## Issues +## 问题报告 我们正在逐步过渡到 JIRA 来接收 Bug 的报告和 Issues,而之前使用的 GitHub issues 将会被弃用。