@velox0/cerver 0.3.0 → 0.3.1

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/README.md CHANGED
@@ -1,8 +1,12 @@
1
+ <div align="center">
2
+ <img src="templates/cerver.png" alt="Cerver Logo" width="120" />
3
+ </div>
4
+
1
5
  # Cerver
2
6
 
3
7
  A lightweight, compile-time web framework that transpiles restricted JavaScript server logic into highly optimized native C HTTP server binaries.
4
8
 
5
- Cerver takes a Next.js-style file-based routing structure (written in a strict subset of JavaScript), parses it, generates equivalent C code, embeds your static assets, and compiles it all into a single, standalone executable (~50KB) that runs with zero Node.js dependency.
9
+ Cerver takes a Next.js-style file-based routing structure (written in a strict subset of JavaScript), parses it, generates equivalent C code, embeds your static assets, and compiles it all into a single, standalone executable that runs with zero Node.js dependency.
6
10
 
7
11
  ## Features
8
12
 
@@ -53,15 +53,103 @@ function newProject(name) {
53
53
  <meta charset="utf-8">
54
54
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
55
55
  <title>${name}</title>
56
+ <link rel="icon" href="/favicon.ico" type="image/x-icon">
57
+ <style>
58
+ :root {
59
+ --bg-color: #0f172a;
60
+ --text-color: #f8fafc;
61
+ --accent-color: #38bdf8;
62
+ --card-bg: rgba(30, 41, 59, 0.7);
63
+ }
64
+ body {
65
+ margin: 0;
66
+ padding: 0;
67
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
68
+ background-color: var(--bg-color);
69
+ color: var(--text-color);
70
+ display: flex;
71
+ flex-direction: column;
72
+ align-items: center;
73
+ justify-content: center;
74
+ min-height: 100vh;
75
+ background: radial-gradient(circle at top right, #1e293b, #0f172a);
76
+ }
77
+ .container {
78
+ background: var(--card-bg);
79
+ backdrop-filter: blur(12px);
80
+ -webkit-backdrop-filter: blur(12px);
81
+ border: 1px solid rgba(255, 255, 255, 0.1);
82
+ padding: 3rem;
83
+ border-radius: 16px;
84
+ text-align: center;
85
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
86
+ max-width: 500px;
87
+ width: 90%;
88
+ animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
89
+ opacity: 0;
90
+ transform: translateY(20px);
91
+ }
92
+ @keyframes fadeUp {
93
+ to { opacity: 1; transform: translateY(0); }
94
+ }
95
+ .logo {
96
+ width: 120px;
97
+ height: 120px;
98
+ margin-bottom: 1.5rem;
99
+ border-radius: 24%;
100
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
101
+ transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
102
+ }
103
+ .logo:hover {
104
+ transform: scale(1.08) rotate(-3deg);
105
+ }
106
+ h1 {
107
+ margin: 0 0 1rem 0;
108
+ font-size: 2.5rem;
109
+ font-weight: 700;
110
+ letter-spacing: -0.025em;
111
+ }
112
+ p {
113
+ margin: 0;
114
+ color: #94a3b8;
115
+ font-size: 1.125rem;
116
+ line-height: 1.6;
117
+ }
118
+ .badge {
119
+ display: inline-block;
120
+ margin-top: 2rem;
121
+ padding: 0.5rem 1rem;
122
+ background: rgba(56, 189, 248, 0.1);
123
+ color: var(--accent-color);
124
+ border-radius: 9999px;
125
+ font-size: 0.875rem;
126
+ font-weight: 600;
127
+ border: 1px solid rgba(56, 189, 248, 0.2);
128
+ }
129
+ </style>
56
130
  </head>
57
131
  <body>
58
- <h1>${name}</h1>
59
- <p>Served by cerver.</p>
132
+ <div class="container">
133
+ <img src="/cerver.png" alt="cerver logo" class="logo">
134
+ <h1>${name}</h1>
135
+ <p>Your ultra-fast, native web application is running.</p>
136
+ <div class="badge">Powered by cerver</div>
137
+ </div>
60
138
  </body>
61
139
  </html>
62
140
  `
63
141
  );
64
142
 
143
+ // Copy standard static assets
144
+ fs.copyFileSync(
145
+ path.join(templatesDir, "cerver.png"),
146
+ path.join(projectDir, "public", "cerver.png")
147
+ );
148
+ fs.copyFileSync(
149
+ path.join(templatesDir, "favicon.ico"),
150
+ path.join(projectDir, "public", "favicon.ico")
151
+ );
152
+
65
153
  // package.json
66
154
  fs.writeFileSync(
67
155
  path.join(projectDir, "package.json"),
@@ -83,6 +171,8 @@ function newProject(name) {
83
171
  console.log(" Created:");
84
172
  console.log(" app/routes/index.js");
85
173
  console.log(" public/index.html");
174
+ console.log(" public/cerver.png");
175
+ console.log(" public/favicon.ico");
86
176
  console.log(" cerver.config.js");
87
177
  console.log(" package.json");
88
178
  console.log("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velox0/cerver",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Compile restricted JavaScript server logic into optimized native C binaries",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
Binary file
Binary file