create-forkly 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/template/app.ts +2 -2
- package/template/config/default.json +2 -1
- package/template/package.json +1 -1
- package/template/public/index.html +241 -14
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/template/app.ts
CHANGED
package/template/package.json
CHANGED
|
@@ -1,22 +1,249 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<html lang="
|
|
2
|
+
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<meta charset="UTF-8"
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0"
|
|
6
|
-
<title>Forkly
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Forkly</title>
|
|
7
7
|
<style>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
--bg: #0a0a0f;
|
|
12
|
+
--surface: #12121a;
|
|
13
|
+
--border: #1e1e2e;
|
|
14
|
+
--text: #e0e0f0;
|
|
15
|
+
--muted: #6c6c8a;
|
|
16
|
+
--accent: #7c5cfc;
|
|
17
|
+
--accent-glow: rgba(124, 92, 252, 0.25);
|
|
18
|
+
--green: #4ade80;
|
|
19
|
+
--font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
body {
|
|
23
|
+
background: var(--bg);
|
|
24
|
+
color: var(--text);
|
|
25
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
|
|
26
|
+
min-height: 100vh;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
overflow-x: hidden;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
body::before {
|
|
35
|
+
content: '';
|
|
36
|
+
position: fixed;
|
|
37
|
+
top: -40%;
|
|
38
|
+
left: -20%;
|
|
39
|
+
width: 140%;
|
|
40
|
+
height: 140%;
|
|
41
|
+
background: radial-gradient(ellipse at 30% 50%, rgba(124, 92, 252, 0.06) 0%, transparent 60%),
|
|
42
|
+
radial-gradient(ellipse at 70% 50%, rgba(74, 222, 128, 0.04) 0%, transparent 60%);
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
z-index: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
main {
|
|
48
|
+
position: relative;
|
|
49
|
+
z-index: 1;
|
|
50
|
+
text-align: center;
|
|
51
|
+
padding: 2rem;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.logo {
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 12px;
|
|
58
|
+
margin-bottom: 0.75rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.logo svg {
|
|
62
|
+
width: 48px;
|
|
63
|
+
height: 48px;
|
|
64
|
+
filter: drop-shadow(0 0 24px var(--accent-glow));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
h1 {
|
|
68
|
+
font-size: 3.5rem;
|
|
69
|
+
font-weight: 800;
|
|
70
|
+
letter-spacing: -0.03em;
|
|
71
|
+
background: linear-gradient(135deg, #c4b5fd 0%, var(--accent) 40%, #a78bfa 100%);
|
|
72
|
+
-webkit-background-clip: text;
|
|
73
|
+
-webkit-text-fill-color: transparent;
|
|
74
|
+
background-clip: text;
|
|
75
|
+
line-height: 1.15;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.tagline {
|
|
79
|
+
color: var(--muted);
|
|
80
|
+
font-size: 1.1rem;
|
|
81
|
+
margin-top: 0.5rem;
|
|
82
|
+
font-weight: 400;
|
|
83
|
+
letter-spacing: 0.01em;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.status {
|
|
87
|
+
display: inline-flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
gap: 8px;
|
|
90
|
+
margin-top: 2rem;
|
|
91
|
+
padding: 10px 22px;
|
|
92
|
+
background: var(--surface);
|
|
93
|
+
border: 1px solid var(--border);
|
|
94
|
+
border-radius: 999px;
|
|
95
|
+
font-size: 0.9rem;
|
|
96
|
+
color: var(--muted);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.status-dot {
|
|
100
|
+
width: 8px;
|
|
101
|
+
height: 8px;
|
|
102
|
+
border-radius: 50%;
|
|
103
|
+
background: var(--green);
|
|
104
|
+
box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
|
|
105
|
+
animation: pulse-dot 2s ease-in-out infinite;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@keyframes pulse-dot {
|
|
109
|
+
0%, 100% { opacity: 1; }
|
|
110
|
+
50% { opacity: 0.45; }
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.endpoints {
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-wrap: wrap;
|
|
116
|
+
gap: 12px;
|
|
117
|
+
justify-content: center;
|
|
118
|
+
margin-top: 2.5rem;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.endpoint-card {
|
|
122
|
+
background: var(--surface);
|
|
123
|
+
border: 1px solid var(--border);
|
|
124
|
+
border-radius: 12px;
|
|
125
|
+
padding: 16px 24px;
|
|
126
|
+
min-width: 200px;
|
|
127
|
+
text-align: left;
|
|
128
|
+
transition: border-color 0.2s, box-shadow 0.2s;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.endpoint-card:hover {
|
|
132
|
+
border-color: var(--accent);
|
|
133
|
+
box-shadow: 0 0 20px var(--accent-glow);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.endpoint-card .method {
|
|
137
|
+
font-family: var(--font-mono);
|
|
138
|
+
font-size: 0.75rem;
|
|
139
|
+
font-weight: 700;
|
|
140
|
+
text-transform: uppercase;
|
|
141
|
+
letter-spacing: 0.08em;
|
|
142
|
+
color: var(--green);
|
|
143
|
+
margin-bottom: 6px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.endpoint-card .path {
|
|
147
|
+
font-family: var(--font-mono);
|
|
148
|
+
font-size: 0.95rem;
|
|
149
|
+
color: var(--text);
|
|
150
|
+
word-break: break-all;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.endpoint-card .desc {
|
|
154
|
+
font-size: 0.8rem;
|
|
155
|
+
color: var(--muted);
|
|
156
|
+
margin-top: 4px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.quickstart {
|
|
160
|
+
margin-top: 3.5rem;
|
|
161
|
+
background: var(--surface);
|
|
162
|
+
border: 1px solid var(--border);
|
|
163
|
+
border-radius: 12px;
|
|
164
|
+
padding: 20px 28px;
|
|
165
|
+
display: inline-block;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.quickstart code {
|
|
169
|
+
font-family: var(--font-mono);
|
|
170
|
+
font-size: 0.9rem;
|
|
171
|
+
background: transparent;
|
|
172
|
+
color: #e0e0f0;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.quickstart .cmd {
|
|
176
|
+
color: var(--accent);
|
|
177
|
+
font-weight: 600;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.quickstart .arg {
|
|
181
|
+
color: var(--green);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
footer {
|
|
185
|
+
margin-top: 3rem;
|
|
186
|
+
color: var(--muted);
|
|
187
|
+
font-size: 0.8rem;
|
|
188
|
+
position: relative;
|
|
189
|
+
z-index: 1;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
footer a {
|
|
193
|
+
color: var(--accent);
|
|
194
|
+
text-decoration: none;
|
|
195
|
+
}
|
|
12
196
|
</style>
|
|
13
197
|
</head>
|
|
14
198
|
<body>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
199
|
+
<main>
|
|
200
|
+
<div class="logo">
|
|
201
|
+
<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
202
|
+
<rect x="4" y="8" width="16" height="32" rx="4" fill="#7c5cfc" opacity="0.9"/>
|
|
203
|
+
<rect x="24" y="4" width="16" height="40" rx="4" fill="#7c5cfc" opacity="0.85"/>
|
|
204
|
+
<rect x="12" y="16" width="8" height="8" rx="2" fill="#0a0a0f" opacity="0.5"/>
|
|
205
|
+
<rect x="32" y="12" width="8" height="8" rx="2" fill="#0a0a0f" opacity="0.5"/>
|
|
206
|
+
<rect x="16" y="32" width="6" height="4" rx="1" fill="#4ade80" opacity="0.7"/>
|
|
207
|
+
<rect x="36" y="30" width="6" height="8" rx="1" fill="#4ade80" opacity="0.7"/>
|
|
208
|
+
</svg>
|
|
209
|
+
<h1>Forkly</h1>
|
|
210
|
+
</div>
|
|
211
|
+
|
|
212
|
+
<p class="tagline">Multi-process Node.js framework — zero deps, zero fuss.</p>
|
|
213
|
+
|
|
214
|
+
<div class="status">
|
|
215
|
+
<span class="status-dot"></span>
|
|
216
|
+
<span>Server is running</span>
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
<div class="endpoints">
|
|
220
|
+
<div class="endpoint-card">
|
|
221
|
+
<div class="method">GET</div>
|
|
222
|
+
<div class="path">/api/hello</div>
|
|
223
|
+
<div class="desc">Health check endpoint</div>
|
|
224
|
+
</div>
|
|
225
|
+
<div class="endpoint-card">
|
|
226
|
+
<div class="method">ANY</div>
|
|
227
|
+
<div class="path">/user/:id</div>
|
|
228
|
+
<div class="desc">File-system route</div>
|
|
229
|
+
</div>
|
|
230
|
+
<div class="endpoint-card">
|
|
231
|
+
<div class="method">STATIC</div>
|
|
232
|
+
<div class="path">/public/*</div>
|
|
233
|
+
<div class="desc">Static file serving</div>
|
|
234
|
+
</div>
|
|
235
|
+
</div>
|
|
236
|
+
|
|
237
|
+
<div class="quickstart">
|
|
238
|
+
<code>
|
|
239
|
+
<span class="cmd">npx create-forkly</span>
|
|
240
|
+
<span class="arg">my-app</span>
|
|
241
|
+
</code>
|
|
242
|
+
</div>
|
|
243
|
+
</main>
|
|
244
|
+
|
|
245
|
+
<footer>
|
|
246
|
+
Built with Forkly — zero runtime dependencies
|
|
247
|
+
</footer>
|
|
21
248
|
</body>
|
|
22
249
|
</html>
|