mwalajs 1.0.7 → 1.0.9
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/.env.backup-2025-12-04T08-55-09-593Z +5 -0
- package/app.mjs +4 -0
- package/bin/mwala copy.mjs +212 -0
- package/bin/mwala.mjs +244 -76
- package/config/createdatabase copy.mjs +362 -0
- package/config/createdatabase.mjs +0 -158
- package/package.json +1 -1
- package/public/images/hekima-mwala.jpg +0 -0
- package/public/images/hekima-mwala2.jpg +0 -0
- package/public/images/mwala3.jpg +0 -0
- package/public/images/mwalajs.jpg +0 -0
- package/public/images/mwalajs1.jpg +0 -0
- package/utils/dbUtils.mjs +150 -0
- package/views/about.ejs +271 -136
- package/views/index.ejs +325 -428
- package/views/mwalajs-framework-documentation.ejs +778 -0
- package/views/partials/footer.ejs +102 -0
- package/views/partials/header.ejs +160 -0
- package/views/steps copy.ejs +243 -0
- package/views/steps.ejs +208 -482
- package/views/welcome.ejs +242 -184
package/views/index.ejs
CHANGED
|
@@ -1,499 +1,396 @@
|
|
|
1
|
+
|
|
2
|
+
<!-- Include header.ejs -->
|
|
3
|
+
<%- include('partials/header') %>
|
|
4
|
+
|
|
1
5
|
<!DOCTYPE html>
|
|
2
6
|
<html lang="en">
|
|
3
7
|
<head>
|
|
4
8
|
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>MwalaJS Framework
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
|
|
10
|
+
<title>MwalaJS Framework - High-Performance Node.js MVC Framework</title>
|
|
7
11
|
|
|
8
|
-
<!-- Bootstrap -->
|
|
9
|
-
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.
|
|
12
|
+
<!-- Bootstrap 5.3.3 -->
|
|
13
|
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
|
10
14
|
|
|
11
|
-
<!--
|
|
12
|
-
<
|
|
13
|
-
<meta name="keywords" content="MwalaJS, MVC, Node.js framework, JavaScript framework, documentation">
|
|
14
|
-
<meta name="author" content="Hekima Ambalile Mwala">
|
|
15
|
+
<!-- Font Awesome 6 -->
|
|
16
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
15
17
|
|
|
16
|
-
<!--
|
|
17
|
-
<meta
|
|
18
|
-
<meta
|
|
19
|
-
<meta
|
|
20
|
-
<meta property="og:url" content="https://mwalajs.biasharabora.com">
|
|
18
|
+
<!-- SEO & Social Meta -->
|
|
19
|
+
<meta name="description" content="MwalaJS - Ultra high-performance Node.js MVC framework powered by Google V8 engine. Full documentation, CLI tools, code generation, migrations, EJS views, and modern ES modules.">
|
|
20
|
+
<meta name="keywords" content="MwalaJS, Node.js, Express, MVC framework, high performance, V8 engine, CLI, migrations, EJS, ES modules, JavaScript framework">
|
|
21
|
+
<meta name="author" content="Hekima Ambalile Mwala">
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
<meta
|
|
23
|
+
<meta property="og:title" content="MwalaJS - High-Performance Node.js MVC Framework" />
|
|
24
|
+
<meta property="og:description" content="The future of Node.js development: blazing fast, scalable, and developer-friendly with built-in MVC, migrations, and CLI scaffolding." />
|
|
25
|
+
<meta property="og:image" content="https://mwalajs.biasharabora.com/images/mwala-logo-large.png" />
|
|
26
|
+
<meta property="og:url" content="https://mwalajs.biasharabora.com" />
|
|
27
|
+
<meta name="twitter:card" content="summary_large_image" />
|
|
24
28
|
|
|
25
29
|
<!-- Favicon -->
|
|
26
|
-
<link rel="icon" href="favicon.ico" type="image/x-icon" />
|
|
30
|
+
<link rel="icon" href="https://mwalajs.biasharabora.com/favicon.ico" type="image/x-icon" />
|
|
27
31
|
|
|
28
|
-
<!-- Custom Styles -->
|
|
29
32
|
<style>
|
|
33
|
+
:root {
|
|
34
|
+
--primary-gradient: linear-gradient(135deg, #0d6efd, #6610f2, #d63384);
|
|
35
|
+
--primary-color: #0d6efd;
|
|
36
|
+
--secondary-color: #6c757d;
|
|
37
|
+
--success-color: #198754;
|
|
38
|
+
--warning-color: #ffc107;
|
|
39
|
+
--dark-color: #212529;
|
|
40
|
+
--light-color: #f8f9fa;
|
|
41
|
+
}
|
|
42
|
+
|
|
30
43
|
body {
|
|
31
|
-
background-color
|
|
44
|
+
background: var(--light-color);
|
|
32
45
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
33
|
-
line-height: 1.
|
|
46
|
+
line-height: 1.7;
|
|
47
|
+
color: #333;
|
|
34
48
|
}
|
|
35
49
|
|
|
36
|
-
|
|
37
|
-
|
|
50
|
+
/* Hero Header - Large Brand Section */
|
|
51
|
+
.hero {
|
|
52
|
+
background: var(--primary-gradient);
|
|
53
|
+
color: white;
|
|
54
|
+
padding: 120px 0 80px;
|
|
55
|
+
text-align: center;
|
|
56
|
+
position: relative;
|
|
57
|
+
overflow: hidden;
|
|
38
58
|
}
|
|
39
59
|
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
60
|
+
.hero::before {
|
|
61
|
+
content: '';
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: 0; left: 0; right: 0; bottom: 0;
|
|
64
|
+
background: rgba(0,0,0,0.3);
|
|
65
|
+
z-index: 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.hero-content {
|
|
69
|
+
position: relative;
|
|
70
|
+
z-index: 2;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.hero h1 {
|
|
74
|
+
font-size: 4.5rem;
|
|
75
|
+
font-weight: 900;
|
|
76
|
+
text-shadow: 0 4px 10px rgba(0,0,0,0.4);
|
|
77
|
+
margin-bottom: 1.5rem;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.hero .lead {
|
|
81
|
+
font-size: 1.5rem;
|
|
82
|
+
max-width: 900px;
|
|
83
|
+
margin: 0 auto 2rem;
|
|
84
|
+
opacity: 0.95;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.hero .btn-hero {
|
|
88
|
+
font-size: 1.3rem;
|
|
89
|
+
padding: 1rem 2.5rem;
|
|
90
|
+
border-radius: 50px;
|
|
91
|
+
margin: 0.5rem;
|
|
92
|
+
box-shadow: 0 8px 20px rgba(0,0,0,0.3);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.hero .v8-badge {
|
|
96
|
+
background: rgba(255,255,255,0.2);
|
|
97
|
+
backdrop-filter: blur(10px);
|
|
98
|
+
padding: 1rem 2rem;
|
|
99
|
+
border-radius: 50px;
|
|
100
|
+
display: inline-block;
|
|
45
101
|
margin-top: 2rem;
|
|
102
|
+
font-size: 1.2rem;
|
|
46
103
|
}
|
|
47
104
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
overflow-x: auto;
|
|
105
|
+
/* Navbar */
|
|
106
|
+
.navbar {
|
|
107
|
+
background: rgba(33, 37, 41, 0.95) !important;
|
|
108
|
+
backdrop-filter: blur(10px);
|
|
109
|
+
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
|
|
54
110
|
}
|
|
55
111
|
|
|
56
112
|
.nav-link {
|
|
57
113
|
color: white !important;
|
|
114
|
+
font-weight: 500;
|
|
115
|
+
transition: all 0.3s;
|
|
58
116
|
}
|
|
59
117
|
|
|
60
|
-
.
|
|
61
|
-
|
|
118
|
+
.nav-link:hover {
|
|
119
|
+
color: var(--warning-color) !important;
|
|
120
|
+
transform: translateY(-2px);
|
|
62
121
|
}
|
|
63
122
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
123
|
+
/* Sections */
|
|
124
|
+
.section-card {
|
|
125
|
+
background: white;
|
|
126
|
+
border-radius: 16px;
|
|
127
|
+
padding: 3rem;
|
|
128
|
+
margin-bottom: 3rem;
|
|
129
|
+
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
|
|
130
|
+
transition: transform 0.4s ease;
|
|
69
131
|
}
|
|
70
132
|
|
|
71
|
-
.
|
|
72
|
-
|
|
73
|
-
padding: 1rem;
|
|
74
|
-
border-left: 5px solid #198754;
|
|
75
|
-
border-radius: 6px;
|
|
76
|
-
margin-top: 2rem;
|
|
133
|
+
.section-card:hover {
|
|
134
|
+
transform: translateY(-10px);
|
|
77
135
|
}
|
|
78
136
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
137
|
+
pre {
|
|
138
|
+
background: #1e1e1e;
|
|
139
|
+
color: #f8f8f8;
|
|
140
|
+
padding: 2rem;
|
|
141
|
+
border-radius: 12px;
|
|
142
|
+
font-size: 1rem;
|
|
143
|
+
border-left: 6px solid var(--primary-color);
|
|
144
|
+
overflow-x: auto;
|
|
82
145
|
}
|
|
83
146
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
147
|
+
.feature-grid {
|
|
148
|
+
display: grid;
|
|
149
|
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
150
|
+
gap: 2rem;
|
|
151
|
+
margin: 3rem 0;
|
|
152
|
+
}
|
|
88
153
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
154
|
+
.feature-item {
|
|
155
|
+
text-align: center;
|
|
156
|
+
padding: 2rem;
|
|
157
|
+
background: rgba(13,110,253,0.05);
|
|
158
|
+
border-radius: 12px;
|
|
159
|
+
transition: all 0.3s;
|
|
92
160
|
}
|
|
93
|
-
</style>
|
|
94
161
|
|
|
162
|
+
.feature-item:hover {
|
|
163
|
+
background: rgba(13,110,253,0.1);
|
|
164
|
+
transform: scale(1.05);
|
|
165
|
+
}
|
|
95
166
|
|
|
96
|
-
|
|
167
|
+
.feature-icon {
|
|
168
|
+
font-size: 3.5rem;
|
|
169
|
+
color: var(--primary-color);
|
|
170
|
+
margin-bottom: 1.5rem;
|
|
171
|
+
}
|
|
97
172
|
|
|
173
|
+
footer {
|
|
174
|
+
background: var(--primary-gradient);
|
|
175
|
+
color: white;
|
|
176
|
+
padding: 4rem 0 2rem;
|
|
177
|
+
margin-top: 5rem;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.whatsapp-box {
|
|
181
|
+
background: #d1e7dd;
|
|
182
|
+
border-left: 8px solid var(--success-color);
|
|
183
|
+
padding: 2rem;
|
|
184
|
+
border-radius: 12px;
|
|
185
|
+
text-align: center;
|
|
186
|
+
margin: 3rem 0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@media (max-width: 992px) {
|
|
190
|
+
.hero h1 { font-size: 3.5rem; }
|
|
191
|
+
.hero .lead { font-size: 1.3rem; }
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
@media (max-width: 768px) {
|
|
195
|
+
.hero { padding: 80px 0 60px; }
|
|
196
|
+
.hero h1 { font-size: 2.8rem; }
|
|
197
|
+
.hero .lead { font-size: 1.1rem; }
|
|
198
|
+
pre { font-size: 0.9rem; padding: 1.5rem; }
|
|
199
|
+
}
|
|
200
|
+
</style>
|
|
98
201
|
</head>
|
|
99
202
|
<body>
|
|
100
203
|
|
|
101
|
-
<!--
|
|
102
|
-
<nav class="navbar navbar-expand-lg navbar-dark
|
|
204
|
+
<!-- Navbar
|
|
205
|
+
<nav class="navbar navbar-expand-lg navbar-dark fixed-top">
|
|
103
206
|
<div class="container">
|
|
104
|
-
<a class="navbar-brand" href="#">MwalaJS</a>
|
|
207
|
+
<a class="navbar-brand fw-bold fs-3" href="#"><i class="fas fa-rocket me-2"></i>MwalaJS</a>
|
|
105
208
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
|
106
209
|
<span class="navbar-toggler-icon"></span>
|
|
107
210
|
</button>
|
|
108
211
|
<div class="collapse navbar-collapse" id="navbarNav">
|
|
109
212
|
<ul class="navbar-nav ms-auto">
|
|
110
|
-
<li class="nav-item"><a class="nav-link" href="
|
|
111
|
-
<li class="nav-item"><a class="nav-link" href="
|
|
112
|
-
<li class="nav-item"><a class="nav-link" href="
|
|
113
|
-
<li class="nav-item"><a class="nav-link" href="
|
|
114
|
-
<li class="nav-item"><a class="nav-link" href="
|
|
115
|
-
<li class="nav-item"><a class="nav-link" href="
|
|
213
|
+
<li class="nav-item"><a class="nav-link" href="#overview">Overview</a></li>
|
|
214
|
+
<li class="nav-item"><a class="nav-link" href="#features">Features</a></li>
|
|
215
|
+
<li class="nav-item"><a class="nav-link" href="#installation">Installation</a></li>
|
|
216
|
+
<li class="nav-item"><a class="nav-link" href="#commands">Commands</a></li>
|
|
217
|
+
<li class="nav-item"><a class="nav-link" href="#structure">Structure</a></li>
|
|
218
|
+
<li class="nav-item"><a class="nav-link" href="#examples">Examples</a></li>
|
|
219
|
+
<li class="nav-item"><a class="nav-link" href="#downloads">Downloads</a></li>
|
|
116
220
|
</ul>
|
|
117
221
|
</div>
|
|
118
222
|
</div>
|
|
119
|
-
</nav>
|
|
223
|
+
</nav> -->
|
|
224
|
+
|
|
225
|
+
<!-- Large Brand Hero Section -->
|
|
226
|
+
<section class="hero">
|
|
227
|
+
<div class="container hero-content">
|
|
228
|
+
<h1>MWALAJS</h1>
|
|
229
|
+
<p class="lead">Ultra High-Performance Node.js MVC Framework<br>Powered by Google V8 Engine</p>
|
|
230
|
+
<div>
|
|
231
|
+
<a href="#installation" class="btn btn-light btn-hero btn-lg"><i class="fas fa-download me-2"></i>Get Started</a>
|
|
232
|
+
<a href="https://github.com/mwala400/mwalajs" target="_blank" class="btn btn-outline-light btn-hero btn-lg"><i class="fab fa-github me-2"></i>View on GitHub</a>
|
|
233
|
+
</div>
|
|
234
|
+
<div class="v8-badge">
|
|
235
|
+
<i class="fab fa-node-js me-2"></i> Built on JS + V8 Engine Optimization
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
</section>
|
|
239
|
+
|
|
240
|
+
<div class="container my-5">
|
|
120
241
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
242
|
+
<!-- Overview -->
|
|
243
|
+
<section id="overview" class="section-card">
|
|
244
|
+
<h2 class="text-center mb-5"><i class="fas fa-eye me-3"></i>Framework Overview</h2>
|
|
245
|
+
<p class="lead text-center">MwalaJS is a next-generation, high-performance Node.js framework designed for building scalable, modern web applications with blazing speed and developer productivity.</p>
|
|
246
|
+
<p>Leveraging the full power of the <strong>Google V8 JavaScript engine</strong>, MwalaJS delivers exceptional performance while maintaining clean MVC architecture, powerful CLI tools, automatic code generation, and seamless database migrations.</p>
|
|
247
|
+
</section>
|
|
124
248
|
|
|
125
|
-
|
|
126
|
-
|
|
249
|
+
<!-- Features Grid -->
|
|
250
|
+
<section id="features" class="section-card">
|
|
251
|
+
<h2 class="text-center mb-5"><i class="fas fa-star me-3"></i>Core Features</h2>
|
|
252
|
+
<div class="feature-grid">
|
|
253
|
+
<div class="feature-item">
|
|
254
|
+
<div class="feature-icon"><i class="fas fa-bolt"></i></div>
|
|
255
|
+
<h4>Lightning Fast</h4>
|
|
256
|
+
<p>Optimized execution powered by Google V8 engine</p>
|
|
257
|
+
</div>
|
|
258
|
+
<div class="feature-item">
|
|
259
|
+
<div class="feature-icon"><i class="fas fa-layer-group"></i></div>
|
|
260
|
+
<h4>Modern MVC</h4>
|
|
261
|
+
<p>Clean separation of concerns with automatic scaffolding</p>
|
|
262
|
+
</div>
|
|
263
|
+
<div class="feature-item">
|
|
264
|
+
<div class="feature-icon"><i class="fas fa-terminal"></i></div>
|
|
265
|
+
<h4>Powerful CLI</h4>
|
|
266
|
+
<p>Project creation, code generation, and database management</p>
|
|
267
|
+
</div>
|
|
268
|
+
<div class="feature-item">
|
|
269
|
+
<div class="feature-icon"><i class="fas fa-database"></i></div>
|
|
270
|
+
<h4>Advanced Migrations</h4>
|
|
271
|
+
<p>Laravel-style database schema management</p>
|
|
272
|
+
</div>
|
|
273
|
+
<div class="feature-item">
|
|
274
|
+
<div class="feature-icon"><i class="fas fa-code"></i></div>
|
|
275
|
+
<h4>ES Modules Ready</h4>
|
|
276
|
+
<p>Full .mjs support with .js fallback compatibility</p>
|
|
277
|
+
</div>
|
|
278
|
+
<div class="feature-item">
|
|
279
|
+
<div class="feature-icon"><i class="fas fa-shield-alt"></i></div>
|
|
280
|
+
<h4>Security First</h4>
|
|
281
|
+
<p>Built-in protection and best practices</p>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
</section>
|
|
285
|
+
|
|
286
|
+
<!-- Installation -->
|
|
287
|
+
<section id="installation" class="section-card">
|
|
288
|
+
<h2 class="text-center mb-5"><i class="fas fa-download me-3"></i>Installation</h2>
|
|
289
|
+
<div class="row">
|
|
290
|
+
<div class="col-lg-8 mx-auto">
|
|
291
|
+
<p class="text-center fs-5">Latest versions (≥1.0.5) - Recommended</p>
|
|
292
|
+
<pre><code>npm install -g mwalajs</code></pre>
|
|
293
|
+
<p class="text-center">Then create your project:</p>
|
|
294
|
+
<pre><code>mwala create-project my-app
|
|
295
|
+
cd my-app
|
|
296
|
+
mwala serve</code></pre>
|
|
297
|
+
</div>
|
|
298
|
+
</div>
|
|
299
|
+
</section>
|
|
300
|
+
|
|
301
|
+
<!-- Commands -->
|
|
302
|
+
<section id="commands" class="section-card">
|
|
303
|
+
<h2 class="text-center mb-5"><i class="fas fa-terminal me-3"></i>CLI Commands</h2>
|
|
127
304
|
<pre>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
- mwala generate model <name>
|
|
139
|
-
- mwala generate controller <name>
|
|
140
|
-
- mwala generate route <name>
|
|
141
|
-
- mwala generate view <name>
|
|
142
|
-
- mwala generate midware <name>
|
|
143
|
-
|
|
144
|
-
<span class="command">mwala serve</span> ? Start local server.
|
|
145
|
-
<span class="command">mwala help</span> ? List all available commands.
|
|
305
|
+
mwala create-project <name> → Scaffold new MVC project
|
|
306
|
+
mwala serve → Start development server
|
|
307
|
+
mwala generate model <name> → Create model
|
|
308
|
+
mwala generate controller <name> → Create controller
|
|
309
|
+
mwala generate route <name> → Create route
|
|
310
|
+
mwala generate view <name> → Create EJS view
|
|
311
|
+
mwala generate midware <name> → Create middleware
|
|
312
|
+
mwala create-db → Create database
|
|
313
|
+
mwala migrate all → Run all migrations
|
|
314
|
+
mwala help → Show all commands
|
|
146
315
|
</pre>
|
|
147
|
-
</
|
|
148
|
-
<script async="async" data-cfasync="false" src="//pl27404049.profitableratecpm.com/a933398713ec731f0673fbcacee9b154/invoke.js"></script>
|
|
149
|
-
<div id="container-a933398713ec731f0673fbcacee9b154"></div>
|
|
150
|
-
|
|
151
|
-
<div class="container my-5">
|
|
152
|
-
<h1 class="mb-4 text-primary">MwalaJS Framework</h1>
|
|
153
|
-
<p><strong>MwalaJS</strong> is a lightweight and modular JavaScript framework designed for building scalable server-side applications using modern Node.js features.</p>
|
|
154
|
-
|
|
155
|
-
<hr />
|
|
156
|
-
|
|
157
|
-
<h2 class="mt-4">Installation </h2>
|
|
158
|
-
<p>Install MwalaJS globally to use CLI tools:</p>
|
|
159
|
-
<pre><code class=" p-3 rounded">npm install -g mwalajs</code></pre>
|
|
160
|
-
<p>If you're using it in a specific project, install locally:</p>
|
|
161
|
-
<pre><code class="p-3 rounded">npm install mwalajs</code></pre>
|
|
162
|
-
<p><strong>Note:</strong> In case of errors regarding missing <code>fs-extra</code>, you can install it manually:</p>
|
|
163
|
-
<pre><code class=" p-3 rounded">npm install -g fs-extra</code></pre>
|
|
164
|
-
<p><strong>Note 2:</strong> <code class=" p-3 rounded"> NOW MWALAJS IS ONE OF NPM PACKAGE NO NEED TO DOWNLOAD .ZIP, .RAR OR .EXE FILES <br>
|
|
165
|
-
also no need to run mwala init in version 1.0.4 or above
|
|
166
|
-
<br>
|
|
167
|
-
before any create a .json file by running npm init
|
|
168
|
-
make sure in your .json file you have "dependencies": {
|
|
169
|
-
"mwalajs": "^1.0.5"
|
|
170
|
-
}
|
|
171
|
-
and "type": "module", these are more important to be set before run mwala serve
|
|
172
|
-
</code>, you can install it BY npm install -g mwalajs:</p>
|
|
173
|
-
|
|
174
|
-
<hr />
|
|
175
|
-
|
|
176
|
-
<h2 class="mt-4"> Usage</h2>
|
|
177
|
-
<p>Once installed globally, you can use the CLI command:</p>
|
|
178
|
-
<pre><code class=" p-3 rounded">mwala</code></pre>
|
|
179
|
-
<p>Or check the version:</p>
|
|
180
|
-
<pre><code class=" p-3 rounded">mwala -v</code></pre>
|
|
181
|
-
|
|
182
|
-
<hr />
|
|
183
|
-
|
|
184
|
-
<h2 class="mt-4">??? CLI Commands</h2>
|
|
185
|
-
<table class="table table-bordered table-striped">
|
|
186
|
-
<thead class="table-primary">
|
|
187
|
-
<tr>
|
|
188
|
-
<th>Command</th>
|
|
189
|
-
<th>Description</th>
|
|
190
|
-
</tr>
|
|
191
|
-
</thead>
|
|
192
|
-
<tbody>
|
|
193
|
-
<tr>
|
|
194
|
-
<td><code>mwala create-project</code></td>
|
|
195
|
-
<td>Create a new project using MwalaJS</td>
|
|
196
|
-
</tr>
|
|
197
|
-
<tr>
|
|
198
|
-
<td><code>mwala init </code></td>
|
|
199
|
-
<td>initialization of mwalajs </td>
|
|
200
|
-
</tr>
|
|
201
|
-
<tr>
|
|
202
|
-
<td><code>mwala serve</code></td>
|
|
203
|
-
<td>Run the project in development mode</td>
|
|
204
|
-
</tr>
|
|
205
|
-
<tr>
|
|
206
|
-
<td><code>mwala help</code></td>
|
|
207
|
-
<td>Display help instructions</td>
|
|
208
|
-
</tr>
|
|
209
|
-
</tbody>
|
|
210
|
-
</table>
|
|
211
|
-
|
|
212
|
-
<hr />
|
|
213
|
-
|
|
214
|
-
<h2 class="mt-4">?? Security Notes</h2>
|
|
215
|
-
<ul>
|
|
216
|
-
<li>Be sure to keep your dependencies updated.</li>
|
|
217
|
-
<li>Sanitize user inputs.</li>
|
|
218
|
-
<li>Run <code>npm audit</code> regularly.</li>
|
|
219
|
-
</ul>
|
|
220
|
-
|
|
221
|
-
<hr />
|
|
222
|
-
|
|
223
|
-
<h2 class="mt-4"> License</h2>
|
|
224
|
-
<p>MIT License © 2025 Hekima Mwala and MwalaJS Team</p>
|
|
225
|
-
</div>
|
|
316
|
+
</section>
|
|
226
317
|
|
|
227
|
-
<!--
|
|
228
|
-
<section class="
|
|
229
|
-
<h2 class="text-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
<tr>
|
|
248
|
-
<td>RAR</td>
|
|
249
|
-
<td>Latest release RAR</td>
|
|
250
|
-
<td><a class="btn btn-primary btn-sm" href="https://mwalajs.biasharabora.com/files/mwalajsv101.rar">Download</a></td>
|
|
251
|
-
</tr>
|
|
252
|
-
</tbody>
|
|
253
|
-
</table>
|
|
254
|
-
|
|
255
|
-
<h4 class="text-secondary mt-4">Version 1.0.0</h4>
|
|
256
|
-
<table class="table table-bordered table-hover">
|
|
257
|
-
<thead>
|
|
258
|
-
<tr>
|
|
259
|
-
<th>File Type</th>
|
|
260
|
-
<th>Description</th>
|
|
261
|
-
<th>Download</th>
|
|
262
|
-
</tr>
|
|
263
|
-
</thead>
|
|
264
|
-
<tbody>
|
|
265
|
-
<tr>
|
|
266
|
-
<td>EXE</td>
|
|
267
|
-
<td>Installer (.exe)</td>
|
|
268
|
-
<td><a class="btn btn-success btn-sm" href="https://mwalajs.biasharabora.com/files/mwalaJS_installer.exe">Download</a></td>
|
|
269
|
-
</tr>
|
|
270
|
-
<tr>
|
|
271
|
-
<td>ZIP</td>
|
|
272
|
-
<td>v1.0.0 ZIP</td>
|
|
273
|
-
<td><a class="btn btn-secondary btn-sm" href="https://mwalajs.biasharabora.com/files/mwalajsm.zip">Download</a></td>
|
|
274
|
-
</tr>
|
|
275
|
-
<tr>
|
|
276
|
-
<td>RAR</td>
|
|
277
|
-
<td>v1.0.0 RAR</td>
|
|
278
|
-
<td><a class="btn btn-secondary btn-sm" href="https://mwalajs.biasharabora.com/files/mwalajsm.rar">Download</a></td>
|
|
279
|
-
</tr>
|
|
280
|
-
</tbody>
|
|
281
|
-
</table>
|
|
282
|
-
</div>
|
|
318
|
+
<!-- Structure -->
|
|
319
|
+
<section id="structure" class="section-card">
|
|
320
|
+
<h2 class="text-center mb-5"><i class="fas fa-folder-tree me-3"></i>Project Structure</h2>
|
|
321
|
+
<pre>
|
|
322
|
+
my-project/
|
|
323
|
+
├── app.mjs # Main entry point (.mjs required)
|
|
324
|
+
├── config/
|
|
325
|
+
├── controllers/
|
|
326
|
+
├── middlewares/
|
|
327
|
+
├── models/
|
|
328
|
+
├── migrations/
|
|
329
|
+
├── routes/
|
|
330
|
+
├── views/ # EJS templates
|
|
331
|
+
├── public/
|
|
332
|
+
│ ├── css/
|
|
333
|
+
│ ├── js/
|
|
334
|
+
│ └── images/
|
|
335
|
+
├── package.json
|
|
336
|
+
└── README.md
|
|
337
|
+
</pre>
|
|
283
338
|
</section>
|
|
284
339
|
|
|
285
|
-
<!--
|
|
286
|
-
<
|
|
287
|
-
<
|
|
288
|
-
<
|
|
289
|
-
|
|
290
|
-
|
|
340
|
+
<!-- Examples -->
|
|
341
|
+
<section id="examples" class="section-card">
|
|
342
|
+
<h2 class="text-center mb-5"><i class="fas fa-code me-3"></i>Code Examples</h2>
|
|
343
|
+
<h4>app.mjs</h4>
|
|
344
|
+
<pre><code>import mwalajs from 'mwalajs';
|
|
345
|
+
import homeRoutes from './routes/homeRoutes.mjs';
|
|
346
|
+
import path from 'path';
|
|
347
|
+
import { fileURLToPath } from 'url';
|
|
291
348
|
|
|
292
|
-
|
|
293
|
-
<html lang="en">
|
|
294
|
-
<head>
|
|
295
|
-
<meta charset="UTF-8">
|
|
296
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
297
|
-
<title>MwalaJS Installation Guide</title>
|
|
349
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
298
350
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
351
|
+
mwalajs.set('views', path.join(__dirname, 'views'));
|
|
352
|
+
mwalajs.set('view engine', 'ejs');
|
|
353
|
+
mwalajs.useStatic(path.join(__dirname, 'public'));
|
|
302
354
|
|
|
303
|
-
|
|
304
|
-
<iframe width="560" height="315" src="https://www.youtube.com/embed/Zzj0WnvDET4?si=NsgUZDlF0uRuqe1P" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
|
305
|
-
<p><strong>Version:</strong> Latest<br>
|
|
306
|
-
<strong>Official Website:</strong> <a href="https://mwalajs.biasharabora.com" target="_blank">https://mwalajs.biasharabora.com</a></p>
|
|
307
|
-
|
|
308
|
-
<h2> What You’ll Need</h2>
|
|
309
|
-
<ul>
|
|
310
|
-
<li>A computer (Windows preferred)</li>
|
|
311
|
-
<li>Internet connection</li>
|
|
312
|
-
<li>Basic computer knowledge (copy, paste, extracting files)</li>
|
|
313
|
-
<li><a href="https://nodejs.org" target="_blank">Node.js installed</a></li>
|
|
314
|
-
</ul>
|
|
315
|
-
|
|
316
|
-
<h2> Step-by-Step Installation Instructions</h2>
|
|
317
|
-
|
|
318
|
-
<h3>STEP 1: Download MwalaJS</h3>
|
|
319
|
-
<ol>
|
|
320
|
-
<li>Open your browser and go to: <a href="https://mwalajs.biasharabora.com" target="_blank">https://mwalajs.biasharabora.com</a></li>
|
|
321
|
-
<li>Choose one of the files:
|
|
322
|
-
<ul>
|
|
323
|
-
<li><code>MwalaJS.zip</code></li>
|
|
324
|
-
<li><code>MwalaJS.rar</code></li>
|
|
325
|
-
</ul>
|
|
326
|
-
</li>
|
|
327
|
-
<li>Download and save it to your computer (usually goes to your <strong>Downloads</strong> folder).</li>
|
|
328
|
-
</ol>
|
|
329
|
-
|
|
330
|
-
<h3>STEP 2: Extract the Downloaded File</h3>
|
|
331
|
-
<ol>
|
|
332
|
-
<li>Go to your <strong>Downloads</strong> folder.</li>
|
|
333
|
-
<li>Right-click on the downloaded file:
|
|
334
|
-
<ul>
|
|
335
|
-
<li>If ZIP ? choose <strong>Extract All</strong></li>
|
|
336
|
-
<li>If RAR ? open with <strong>WinRAR</strong> or <strong>7-Zip</strong></li>
|
|
337
|
-
</ul>
|
|
338
|
-
</li>
|
|
339
|
-
<li>You’ll get a folder named <code>mwalajs</code>. Copy or cut this folder.</li>
|
|
340
|
-
</ol>
|
|
341
|
-
|
|
342
|
-
<h3>STEP 3: Move to Program Files</h3>
|
|
343
|
-
<ol>
|
|
344
|
-
<li>Open <strong>C:\Program Files</strong> on your PC.</li>
|
|
345
|
-
<li>Paste the <code>mwalajs</code> folder inside.</li>
|
|
346
|
-
<li>If asked for administrator permission, click <strong>Continue</strong>.</li>
|
|
347
|
-
</ol>
|
|
348
|
-
|
|
349
|
-
<h3>STEP 4: Add to Environment Variable</h3>
|
|
350
|
-
<div class="note">This step allows you to run <code>mwala</code> command from any terminal window.</div>
|
|
351
|
-
<ol>
|
|
352
|
-
<li>Press <strong>Windows + S</strong>, type <em>environment variables</em>, and click on <strong>Edit the system environment variables</strong>.</li>
|
|
353
|
-
<li>In the new window, click <strong>Environment Variables</strong>.</li>
|
|
354
|
-
<li>Under <strong>System variables</strong>, select <code>Path</code> and click <strong>Edit</strong>.</li>
|
|
355
|
-
<li>Click <strong>New</strong>, then paste the path:
|
|
356
|
-
<pre>C:\Program Files\mwalajs</pre>
|
|
357
|
-
</li>
|
|
358
|
-
<li>Click <strong>OK</strong> on all windows to save changes.</li>
|
|
359
|
-
</ol>
|
|
360
|
-
|
|
361
|
-
<h3>STEP 5: Test the Installation</h3>
|
|
362
|
-
<ol>
|
|
363
|
-
<li>Open <strong>Command Prompt</strong> (Windows + R ? type <code>cmd</code> ? Enter).</li>
|
|
364
|
-
<li>Type the following command and press Enter:
|
|
365
|
-
<pre>mwala</pre>
|
|
366
|
-
</li>
|
|
367
|
-
<li>If installed correctly, you’ll see a welcome message or command list.</li>
|
|
368
|
-
</ol>
|
|
369
|
-
|
|
370
|
-
<h2> Extra Tips</h2>
|
|
371
|
-
<ul>
|
|
372
|
-
<li>If <code>mwala</code> is not recognized:
|
|
373
|
-
<ul>
|
|
374
|
-
<li>Close and reopen your terminal.</li>
|
|
375
|
-
<li>Double-check that you added the correct path to the environment variable.</li>
|
|
376
|
-
</ul>
|
|
377
|
-
</li>
|
|
378
|
-
<li>Make sure the <code>mwalajs</code> folder contains a file like <code>mwala.mjs</code>.</li>
|
|
379
|
-
<li>Ensure Node.js is installed properly.</li>
|
|
380
|
-
</ul>
|
|
381
|
-
|
|
382
|
-
<h2>Troubleshooting</h2>
|
|
383
|
-
<table>
|
|
384
|
-
<thead>
|
|
385
|
-
<tr>
|
|
386
|
-
<th>Issue</th>
|
|
387
|
-
<th>Solution</th>
|
|
388
|
-
</tr>
|
|
389
|
-
</thead>
|
|
390
|
-
<tbody>
|
|
391
|
-
<tr>
|
|
392
|
-
<td><code>mwala</code> is not recognized</td>
|
|
393
|
-
<td>Recheck environment path, restart CMD</td>
|
|
394
|
-
</tr>
|
|
395
|
-
<tr>
|
|
396
|
-
<td>File won’t extract</td>
|
|
397
|
-
<td>Install <a href="https://www.7-zip.org" target="_blank">7-Zip</a> or <a href="https://www.rarlab.com" target="_blank">WinRAR</a></td>
|
|
398
|
-
</tr>
|
|
399
|
-
<tr>
|
|
400
|
-
<td>Node.js not found</td>
|
|
401
|
-
<td><a href="https://nodejs.org" target="_blank">Download from Node.js official site</a></td>
|
|
402
|
-
</tr>
|
|
403
|
-
</tbody>
|
|
404
|
-
</table>
|
|
405
|
-
|
|
406
|
-
<h3>LINUX INSTALLATION (Ubuntu / Debian / Fedora / Others)</h3>
|
|
407
|
-
|
|
408
|
-
<div class="note">Make sure Node.js is already installed on your system before you begin.</div>
|
|
409
|
-
|
|
410
|
-
<ol>
|
|
411
|
-
<li><strong>Download MwalaJS:</strong>
|
|
412
|
-
<ul>
|
|
413
|
-
<li>Visit: <a href="https://mwalajs.biasharabora.com" target="_blank">https://mwalajs.biasharabora.com</a></li>
|
|
414
|
-
<li>Select and download either:
|
|
415
|
-
<ul>
|
|
416
|
-
<li><code>MwalaJS.zip</code></li>
|
|
417
|
-
<li><code>MwalaJS.tar.gz</code></li>
|
|
418
|
-
</ul>
|
|
419
|
-
</li>
|
|
420
|
-
</ul>
|
|
421
|
-
</li>
|
|
422
|
-
|
|
423
|
-
<li><strong>Open Terminal and go to the Downloads folder:</strong>
|
|
424
|
-
<pre>cd ~/Downloads</pre>
|
|
425
|
-
</li>
|
|
426
|
-
|
|
427
|
-
<li><strong>Extract the downloaded file:</strong>
|
|
428
|
-
<ul>
|
|
429
|
-
<li>If ZIP:
|
|
430
|
-
<pre>unzip MwalaJS.zip</pre>
|
|
431
|
-
</li>
|
|
432
|
-
<li>If TAR.GZ:
|
|
433
|
-
<pre>tar -xvzf MwalaJS.tar.gz</pre>
|
|
434
|
-
</li>
|
|
435
|
-
</ul>
|
|
436
|
-
</li>
|
|
437
|
-
|
|
438
|
-
<li><strong>Move the extracted folder to a system directory:</strong>
|
|
439
|
-
<pre>sudo mv mwalajs /opt/</pre>
|
|
440
|
-
</li>
|
|
441
|
-
|
|
442
|
-
<li><strong>Make the main file executable (if it's a script):</strong>
|
|
443
|
-
<pre>sudo chmod +x /opt/mwalajs/mwala.mjs</pre>
|
|
444
|
-
</li>
|
|
445
|
-
|
|
446
|
-
<li><strong>Create a system-wide shortcut (symlink):</strong>
|
|
447
|
-
<pre>sudo ln -s /opt/mwalajs/mwala.mjs /usr/local/bin/mwala</pre>
|
|
448
|
-
</li>
|
|
449
|
-
|
|
450
|
-
<li><strong>Test the installation:</strong>
|
|
451
|
-
<pre>mwala</pre>
|
|
452
|
-
<p>If everything is set up correctly, you’ll see a welcome message or command list.</p>
|
|
453
|
-
</li>
|
|
454
|
-
</ol>
|
|
455
|
-
|
|
456
|
-
<h4>Troubleshooting</h4>
|
|
457
|
-
<table>
|
|
458
|
-
<thead>
|
|
459
|
-
<tr><th>Issue</th><th>Solution</th></tr>
|
|
460
|
-
</thead>
|
|
461
|
-
<tbody>
|
|
462
|
-
<tr>
|
|
463
|
-
<td><code>mwala: command not found</code></td>
|
|
464
|
-
<td>Check if the symlink is correct: <code>ls -l /usr/local/bin/mwala</code></td>
|
|
465
|
-
</tr>
|
|
466
|
-
<tr>
|
|
467
|
-
<td>Node.js not installed</td>
|
|
468
|
-
<td>Install Node.js using:
|
|
469
|
-
<pre>sudo apt install nodejs npm</pre>
|
|
470
|
-
</td>
|
|
471
|
-
</tr>
|
|
472
|
-
<tr>
|
|
473
|
-
<td>Permission denied</td>
|
|
474
|
-
<td>Try using <code>sudo</code> or ensure the file has executable permission</td>
|
|
475
|
-
</tr>
|
|
476
|
-
</tbody>
|
|
477
|
-
</table>
|
|
355
|
+
mwalajs.use('/', homeRoutes);
|
|
478
356
|
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
357
|
+
mwalajs.listen(3000, () => {
|
|
358
|
+
console.log('MwalaJS running on http://localhost:3000');
|
|
359
|
+
});</code></pre>
|
|
360
|
+
</section>
|
|
361
|
+
|
|
362
|
+
<!-- Downloads -->
|
|
363
|
+
<section id="downloads" class="section-card">
|
|
364
|
+
<h2 class="text-center mb-5"><i class="fas fa-cloud-download-alt me-3"></i>Legacy Downloads</h2>
|
|
365
|
+
<div class="text-center">
|
|
366
|
+
<a href="https://mwalajs.biasharabora.com/files/mwalaJS_installer.exe" class="btn btn-success btn-lg m-3"><i class="fas fa-file-archive"></i> .exe Installer</a>
|
|
367
|
+
<a href="https://mwalajs.biasharabora.com/files/mwalajsm.zip" class="btn btn-primary btn-lg m-3"><i class="fas fa-file-zipper"></i> .zip v1.0.0</a>
|
|
368
|
+
<a href="https://mwalajs.biasharabora.com/files/mwalajsm.rar" class="btn btn-info btn-lg m-3"><i class="fas fa-file-archive"></i> .rar v1.0.0</a>
|
|
369
|
+
</div>
|
|
370
|
+
</section>
|
|
371
|
+
|
|
372
|
+
<!-- WhatsApp Support -->
|
|
373
|
+
<div class="whatsapp-box">
|
|
374
|
+
<h3><i class="fab fa-whatsapp me-3"></i>Join Our Community</h3>
|
|
375
|
+
<p>Get instant support from developers and the core team</p>
|
|
376
|
+
<a href="https://chat.whatsapp.com/F8x1p8R1EhZ5b7RX7PO6dR?mode=r_t" target="_blank" class="btn btn-success btn-lg">
|
|
377
|
+
<i class="fas fa-users"></i> Join WhatsApp Group
|
|
378
|
+
</a>
|
|
379
|
+
</div>
|
|
380
|
+
|
|
381
|
+
</div>
|
|
487
382
|
|
|
488
|
-
|
|
489
383
|
<!-- Footer -->
|
|
490
|
-
<footer
|
|
491
|
-
<div class="container">
|
|
492
|
-
|
|
384
|
+
<footer>
|
|
385
|
+
<div class="container text-center">
|
|
386
|
+
<h3>MwalaJS Framework</h3>
|
|
387
|
+
<p>Built with performance, scalability, and developer happiness in mind.</p>
|
|
493
388
|
</div>
|
|
494
389
|
</footer>
|
|
495
390
|
|
|
496
391
|
<!-- Bootstrap JS -->
|
|
497
|
-
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.
|
|
392
|
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
498
393
|
</body>
|
|
499
394
|
</html>
|
|
395
|
+
|
|
396
|
+
<%- include('partials/footer') %>
|