Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.MD

Component based MVC web framework for nodejs targeting good code structures & modularity.

GitHub version Build Status npm version Docs

Why fortjs

  • Based on Fort architecture.
  • MVC Framework and follows OOPS approach so everything is class and object.
  • Provides components - Wall, Shield and Guard. Components help modularize the application.
  • No callback, Uses ES6 async/await or promise for executing asychronous code.
  • Everything is configurable - you can configure your session store, view engine, websocket etc.
  • Dependency Injection.
  • Everything can be unit tested, so you can use a TDD approach.
  • TypeScript Support - Fully supported for typescript users.

How to use

Controller

import {Controller, DefaultWorker, textResult } from "fortjs" 
export class UserController extends Controller{

    @DefaultWorker()
    async getUsers(){
        return textResult("Hey, I am get users method");
    }
}

Bootstrap

import { Fort } from "fortjs";
import { UserController } from "./controllers";

// add routes
Fort.routes = [{
    controller: UserController,
    path: "/user"
}]

// initiate app
Fort.create().then(()=>{
    Fort.logger.info(`App is started at location : http://localhost:${Fort.port}`);
})

Examples

Check out repo - https://github.com/ujjwalguptaofficial/fortjs-examples

Website

http://fortjs.info/

Contributors

You are very welcome to contribute, please see contributing guidelines - [Contribute].

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. For sponsoring, contact author of this project.

TODO

  • Absolute route
  • Retrieve dependency injection value from anywhere like in service