Awesome Open Source
Awesome Open Source

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

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
typescript (10,457
nodejs (3,640
framework (1,075
es6 (519
server (511
http-server (189
mvc-framework (23
nodejs-framework (16

Find Open Source By Browsing 7,000 Topics Across 59 Categories