mwalajs 1.0.4 → 1.0.5
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 +63 -17
- package/bin/mwala.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -77,6 +77,59 @@ mwala serve
|
|
|
77
77
|
### app.mjs
|
|
78
78
|
Here is an example of the default `app.mjs` file for starting the server:
|
|
79
79
|
|
|
80
|
+
|
|
81
|
+
git clone https://github.com/mwala400/mwalajs.git
|
|
82
|
+

|
|
83
|
+

|
|
84
|
+

|
|
85
|
+
# MwalaJS Framework
|
|
86
|
+
|
|
87
|
+
MwalaJS is a modern CLI tool and web framework built on top of Javascript,Node.js and Express.js for powerful and fast backend and frontend development. It simplifies creating MVC applications, managing databases, and generating code scaffolding.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Table of Contents
|
|
92
|
+
|
|
93
|
+
- [Features](#features)
|
|
94
|
+
- [Requirements](#requirements)
|
|
95
|
+
- [Installation](#installation)
|
|
96
|
+
- [Setup](#setup)
|
|
97
|
+
- [Usage](#usage)
|
|
98
|
+
- [CLI Commands](#cli-commands)
|
|
99
|
+
- [Project Structure](#project-structure)
|
|
100
|
+
- [Contributing](#contributing)
|
|
101
|
+
- [License](#license)
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Features
|
|
106
|
+
|
|
107
|
+
- Lightweight Express.js wrapper with MVC pattern
|
|
108
|
+
- CLI tool for project scaffolding and database management
|
|
109
|
+
- Support for multiple databases: MongoDB, MySQL, PostgreSQL, SQLite
|
|
110
|
+
- Built-in middleware integration (session, cors, helmet, compression)
|
|
111
|
+
- Easy static file serving and routing
|
|
112
|
+
- Code generation for models, controllers, routes, views, and middleware
|
|
113
|
+
- Migration support for database schema changes
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Requirements
|
|
118
|
+
|
|
119
|
+
- Node.js v18 or higher
|
|
120
|
+
- npm (comes with Node.js)
|
|
121
|
+
- Supported databases (MongoDB, MySQL, PostgreSQL, SQLite) installed and configured
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Installation
|
|
126
|
+
|
|
127
|
+
Install MwalaJS globally via npm:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
npm install -g mwalajs
|
|
131
|
+
|
|
132
|
+
|
|
80
133
|
```javascript
|
|
81
134
|
import mwalajs from 'mwalajs';
|
|
82
135
|
import { homeRoutes } from './routes/homeRoutes.mjs';
|
|
@@ -89,7 +142,7 @@ const __dirname = path.dirname(__filename);
|
|
|
89
142
|
mwalajs.set('view engine', 'ejs');
|
|
90
143
|
mwalajs.set('views', path.join(__dirname, 'views'));
|
|
91
144
|
|
|
92
|
-
mwalajs.
|
|
145
|
+
mwalajs.useStatic(path.join(__dirname, 'public'));
|
|
93
146
|
|
|
94
147
|
mwalajs.use('/', homeRoutes);
|
|
95
148
|
|
|
@@ -106,7 +159,7 @@ Here is an example of the default `homeRoutes.mjs` file:
|
|
|
106
159
|
import mwalajs from 'mwalajs';
|
|
107
160
|
import { homeController, Steps, welcome, about } from '../controllers/homeController.mjs';
|
|
108
161
|
|
|
109
|
-
const router = mwalajs.
|
|
162
|
+
const router = mwalajs.Router();
|
|
110
163
|
|
|
111
164
|
router.get('/', homeController.getHomePage);
|
|
112
165
|
router.get('/steps', Steps.getSteps);
|
|
@@ -154,8 +207,8 @@ export const about = {
|
|
|
154
207
|
- `mwala help` | `mwala h` → Show this help message.
|
|
155
208
|
|
|
156
209
|
#### Project Management:
|
|
157
|
-
- `mwala create-project
|
|
158
|
-
- `mwala init` → Initialize MwalaJS in the current project.
|
|
210
|
+
- `mwala create-project ` → Create a new MwalaJS project Then will request project name.
|
|
211
|
+
- `mwala init` → Initialize MwalaJS in the current project I N OLD VERSION .
|
|
159
212
|
|
|
160
213
|
#### Running the Application:
|
|
161
214
|
- `mwala serve` | `mwala app.mjs` → Start the MwalaJS application.
|
|
@@ -188,7 +241,7 @@ Clone the repository from GitHub:
|
|
|
188
241
|
|
|
189
242
|
git clone https://github.com/mwala400/mwalajs.git
|
|
190
243
|
|
|
191
|
-
Using a ZIP, EXE, or RAR File
|
|
244
|
+
Using a ZIP, EXE, or RAR File
|
|
192
245
|
Download and extract the files from the available compressed format:
|
|
193
246
|
|
|
194
247
|
ZIP: Extract using WinRAR or 7-Zip.
|
|
@@ -208,9 +261,9 @@ Click below to download rar file mwalajs framework :
|
|
|
208
261
|
|
|
209
262
|
|
|
210
263
|
|
|
211
|
-
2. Setting Up MwalaJS
|
|
264
|
+
2. Setting Up MwalaJS if installed through .exe,zip or rar
|
|
212
265
|
Initialize MwalaJS
|
|
213
|
-
mwala init
|
|
266
|
+
mwala init
|
|
214
267
|
Creating a New Project
|
|
215
268
|
mwala create-project
|
|
216
269
|
3. Running the Application
|
|
@@ -366,8 +419,8 @@ Summary of MwalaJS Commands
|
|
|
366
419
|
🔹 To execute a command, use:
|
|
367
420
|
mwala
|
|
368
421
|
|
|
369
|
-
|
|
370
|
-
|
|
422
|
+
mwalajs/ # Root directory
|
|
423
|
+
mwalajs/ # Root directory
|
|
371
424
|
│── app.mjs # Main application file
|
|
372
425
|
│── runMigrations.mjs # Handles database migrations
|
|
373
426
|
│── createProject.mjs # Script for creating new projects
|
|
@@ -447,7 +500,7 @@ Your MwalaJS file structure is well-organized, but to make it more convincing fo
|
|
|
447
500
|
Here’s a structured breakdown:
|
|
448
501
|
FOLDERS
|
|
449
502
|
|
|
450
|
-
--
|
|
503
|
+
-- mwalajs/ # Root directory
|
|
451
504
|
│── app.mjs # Main application entry point
|
|
452
505
|
│── ATTENDANCE/ # Attendance-related files (clarify purpose)
|
|
453
506
|
│── bin/ # Executable scripts
|
|
@@ -536,10 +589,3 @@ Click below to download zip file mwalajs framework:
|
|
|
536
589
|
|
|
537
590
|
|
|
538
591
|
Click below to download rar file mwalajs framework :
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
git clone https://github.com/mwala400/mwalajs.git
|
|
542
|
-

|
|
543
|
-

|
|
544
|
-

|
|
545
|
-
|
package/bin/mwala.mjs
CHANGED