MwalaJS - Documentation

Welcome to MwalaJS Documentation

A high-performance framework for JavaScript, Node.js, and Express.

Overview of MwalaJS

MwalaJS is an advanced web development framework that uses the **Google V8 engine** to enhance the performance of JavaScript applications.

Installation

To install MwalaJS, use the following command:

npm install -g mwalajs

Basic Commands

Here are some useful MwalaJS commands:


# Create a new project
example to create project called myapp
HP@mwala MINGW64 ~/OneDrive/Desktop/mwalajsm (main)
$ mwala create-project
Enter the name of the new project: myapp

cd myapp
mwala init
npm install


# Start the development server
mwala serve

# Run migrations
mwala migrate all
# Run rollback
mwala rollback all  #to undo migration

#to create table called users
mwala create-table users
mwala migrate all  #to make it created to database

#to drop table called users
mwala drop-table users
mwala migrate all  #to make it created to database

#to create database called mydb
mwala create-db
HP@mwala MINGW64 ~/OneDrive/Desktop/mwalajsm (main)
$ mwala create-db
✅ Cleared .env file.
Enter the database type (mysql/my, postgresql/pg, mongodb/mn, sqlite/sq): my
Enter the database name: mydb
Enter the database host (default: localhost):
Enter the database user: root
Enter the database password:
✅ Database credentials saved to .env file.


      

Project Structure


/project_name
 
     
      │── app.mjs             # Main application file
      │── runMigrations.mjs   # Handles database migrations
      │── createProject.mjs   # Script for creating new projects
      │── setupMwalajs.mjs    # Setup script for MwalaJS
      │── start.bat           # Batch script to start the server
      │── setup.bat           # Batch script for installation
      │── setup.bash          # Bash script for installation (Linux/macOS)
      │── setup.sh            # Another installation script
      │── package.json        # Dependencies and project metadata
      │── package-lock.json   # Dependency lock file
      │── README.md           # Documentation for MwalaJS
      │── migrations/         # Database migration files
      │── models/             # Database models
      │── controllers/        # Handles application logic
      │── routes/             # Defines API routes
      │── middlewares/        # Custom middleware for authentication, logging, etc.
      │── config/             # Configuration files (e.g., database, app settings)
      │── public/             # Static assets like CSS, JavaScript, and images
      │── views/              # Template views (if using server-side rendering)
      │── mwalajs/            # Core framework files
      │── dist/               # Compiled or built files
      │── node_modules/       # Dependencies installed via npm
      │── YOUR CREATED PROJECT/       # When run mwala create-project will request project name related files (clarify purpose) 
      │── installer/          # Installation-related files
      │── installerimg.png    # Image used during installation
      │── mwalajs5.png        # Framework branding/image
      │── mwalajs4_RXv_icon.ico # Framework icons
      │── mwalajs4_lyh_icon.ico # Another framework icon
      │── mwalajsm.iss        # Installer script for Windows
      │── background.bmp      # Background image (possibly for setup UI)
      │── background.png      # Another background image
      ├── bin/
      

Example Application

Below is a simple **Hello World** example using MwalaJS:


        import mwalajs from 'mwalajs';
        import { homeRoutes } from './routes/homeRoutes.mjs';
        import { fileURLToPath } from 'url';
        import path from 'path';
        
        const __filename = fileURLToPath(import.meta.url);
        const __dirname = path.dirname(__filename);
        
        mwalajs.set('view engine', 'ejs');
        mwalajs.set('views', path.join(__dirname, 'views'));
        
        mwalajs.static(path.join(__dirname, 'public'));
        
        mwalajs.use('/', homeRoutes);
        
        const port = process.env.PORT || 3000;
        mwalajs.listen(port, () => {
          console.log(`Server running on http://localhost:${port}`);
        });
      

Conclusion

MwalaJS is a powerful, high-performance framework that simplifies web development with Node.js and Express. Whether you're building small apps or enterprise solutions, MwalaJS provides scalability and efficiency.

MwalaJS - High-Performance Web Framework

A powerful, efficient, and scalable framework built on the Google V8 Engine.

🚀 Overview of MwalaJS

MwalaJS is a high-speed framework designed for JavaScript, Node.js, and Express. With its integration of the Google V8 engine, it ensures your applications run efficiently, making web development faster, smoother, and more scalable.

🔥 Core Features of MwalaJS

🤔 Why Choose MwalaJS?

🛠 Getting Started with MwalaJS

Follow these steps to start using MwalaJS:

📥 Step 1: Download the Setup


1. VERSION RELEASE

Click below to download the installer For Mwalajs framework:


Download MwalaJS COMMAND SHELL (CLS) download .exe file here

Click below to download zip file mwalajs framework:


Download MwalaJS mwalajs.zip v1.0.0

Click below to download rar file mwalajs framework :


Download MwalaJS mwalajs.rar v1.0.0
git clone https://github.com/mwala400/mwalajs.git

Clone from github https://github.com/mwala400/mwalajs v1.0.0

⚙️ Step 2: Set Up Your Environment

Follow the on-screen instructions to complete the installation. MwalaJS is compatible with all major operating systems.

📖 Step 3: Read the Documentation

Visit our official documentation to explore features, tutorials, and guides.

🎯 Conclusion

MwalaJS is a game-changer in modern web development. Whether you're building small web applications or enterprise systems, MwalaJS offers unmatched performance, security, and scalability.

Start building the future of web development today! 🚀