-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
268 lines (181 loc) · 8.75 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<!--
__________
\______ \____ ____ _____
| ___/ _ \_/ __ \ / \
| | ( <_> ) ___/| Y Y \
|____| \____/ \___ >__|_| /
\/ \/
___________ __
\_ _____/___________ _____ ______ _ _____________| | __
| __) \_ __ \__ \ / \_/ __ \ \/ \/ / _ \_ __ \ |/ /
| \ | | \// __ \| Y Y \ ___/\ ( <_> ) | \/ <
\___ / |__| (____ /__|_| /\___ >\/\_/ \____/|__| |__|_ \
\/ \/ \/ \/ \/
A high-performance rust web framework.
Repository: https://github.com/poem-web
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Poem | A high-performance rust web framework. | poem.rs |https://github.com/poem-web ">
<title>Poem | A high-performance rust web framework.</title>
<meta name="author" content="Poem.rs | A high-performance rust web framework.">
<link rel="shortcut icon" href="static/poem-logo.jpg">
<link rel="icon" href="static/poem-logo.jpg" type="image/gif" />
<link href="static/poem.min.css" rel="stylesheet">
<link href="static/heroes.css" rel="stylesheet">
<!-- 引入CSS -->
<link rel="stylesheet" href="styles/default.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/styles/github.min.css">
<style>
/* CSS */
@import url(https://cdn.jsdelivr.net/gh/tonsky/FiraCode@4/distr/fira_code.css);
.title,.feature{
font-family: 'Fira Code', monospace;
font-size: 64px;
}
.feature{
font-family: 'Fira Code', monospace;
font-size: 32px;
}
.code-text {
font-family: 'Fira Code', monospace;
font-size: 24px;
}
</style>
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
</head>
<body>
<div class="px-4 pt-5 my-5 ">
<div class="text-center">
<h1 class="display-4 fw-bold title">Poem Framework</h1>
<div class="col-lg-6 mx-auto">
<p class="lead mb-4">A high-performance rust web framework.</p>
<div class="d-grid gap-2 d-sm-flex justify-content-sm-center mb-5">
<button type="button" class="btn btn-dark btn-lg px-4 me-md-2" onclick="javascript:window.location.href='https://github.com/poem-web'"><i
class="bi bi-code-slash"></i> Get started</button>
<button type="button" class="btn btn-outline-secondary btn-lg px-4" onclick="javascript:window.location.href='https://github.com/poem-web'"><i
class="bi-github" role="img" aria-label="GitHub"></i> Repository</button>
</div>
</div>
</div>
<div class="overflow-hidden">
<div class="container px-5">
<div class="code-text">
<pre class="content"><code>
use poem::middlewares::StripPrefix;
use poem::route::{self, Route};
use poem::EndpointExt;
async fn hello() -> &'static str {
"hello"
}
#[tokio::main]
async fn main() {
let route = Route::new().at("/hello", route::get(hello));
let api = Route::new().at("/api/*", route.with(StripPrefix::new("/api")));
poem::Server::new(api)
.serve(&"127.0.0.1:3000".parse().unwrap())
.await
.unwrap();
}
</code></pre>
</div>
</div>
</div>
<div class="container px-4 py-5" id="hanging-icons">
<h2 class="pb-2 border-bottom feature">Feature</h2>
<div class="row g-4 py-5 row-cols-1 row-cols-lg-3">
<div class="col d-flex align-items-start">
<div class="icon-square bg-light text-dark flex-shrink-0 me-3">
<svg class="bi" width="1em" height="1em">
<use xlink:href="#toggles2"></use>
</svg>
</div>
<div>
<h2><i class="bi bi-bug-fill"></i> Testing</h2>
<p>Elegant integrated testing helps you quickly locate problems in the system.</p>
</div>
</div>
<div class="col d-flex align-items-start">
<div class="icon-square bg-light text-dark flex-shrink-0 me-3">
<svg class="bi" width="1em" height="1em">
<use xlink:href="#cpu-fill"></use>
</svg>
</div>
<div>
<h2><i class="bi bi-cpu-fill"></i> Async Streams</h2>
<p>Concise and support large-scale concurrent asynchronous task processing.</p>
</div>
</div>
<div class="col d-flex align-items-start">
<div class="icon-square bg-light text-dark flex-shrink-0 me-3">
<svg class="bi" width="1em" height="1em">
<use xlink:href="#tools"></use>
</svg>
</div>
<div>
<h2><i class="bi bi-gear-wide-connected"></i> Config</h2>
<p>Configure your application your way for debug, release, or anything else.</p>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
<div class="col-md-4 d-flex align-items-center">
<a href="/" class="mb-3 me-2 mb-md-0 text-muted text-decoration-none lh-1">
<svg class="bi" width="30" height="24">
<use xlink:href="#bootstrap"></use>
</svg>
</a>
<span class="text-muted">© 2021 Poem Framework Team.</span>
</div>
<ul class="nav col-md-4 justify-content-end list-unstyled d-flex">
<li class="ms-3"><a class="text-muted" href="#">
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="currentColor" class="bi bi-youtube" viewBox="0 0 16 16">
<path d="M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 0 1 1.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.007 2.007 0 0 1-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.007 2.007 0 0 1-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31.4 31.4 0 0 1 0 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.007 2.007 0 0 1 1.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A99.788 99.788 0 0 1 7.858 2h.193zM6.4 5.209v4.818l4.157-2.408L6.4 5.209z" />
</svg>
</a></li>
<li class="ms-3"><a class="text-muted" href="#">
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="currentColor" class="bi bi-twitter" viewBox="0 0 16 16">
<path d="M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z" />
</svg></a></li>
<li class="ms-3"><a class="text-muted" href="#"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"
fill="currentColor" class="bi bi-chat-text-fill" viewBox="0 0 16 16">
<path d="M16 8c0 3.866-3.582 7-8 7a9.06 9.06 0 0 1-2.347-.306c-.584.296-1.925.864-4.181 1.234-.2.032-.352-.176-.273-.362.354-.836.674-1.95.77-2.966C.744 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7zM4.5 5a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1h-7zm0 2.5a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1h-7zm0 2.5a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1h-4z" />
</svg></a></li>
</ul>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/highlight.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.2/js/bootstrap.bundle.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/languages/rust.min.js"></script>
<script type="text/javascript">
hljs.initHighlightingOnLoad();
console.log("\t\t\t\t__________\n" +
"\t\t\t\t\\______ \\____ ____ _____ \n" +
"\t\t\t\t | ___/ _ \\_/ __ \\ / \\ \n" +
"\t\t\t\t | | ( <_> ) ___/| Y Y \\\n" +
"\t\t\t\t |____| \\____/ \\___ >__|_| /\n" +
"\t\t\t\t \\/ \\/ ");
console.log("If you find a bug on this page, please contact the developer: Leon Ding <https://github.com/auula>");
</script>
</body>
</html>