Git Product home page Git Product logo

fortjs's Introduction

Good examples here : https://fortjs.info/tutorial/get-started/

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

GitHub version Build Status npm version Docs

Why the Fork of FortJS?

  • Continues on from the example provided by original author
  • Used for letting students extend the minimal REST server and pages starting from a known, working state

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

fortjs's People

Contributors

ujjwalguptaofficial avatar dependabot[bot] avatar rainman21 avatar grossacasac avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.