miter
A typescript web framework based on ExpressJs based loosely on SailsJs
$ cnpm install miter 
SYNC missed versions from official npm registry.

Build Status

Miter Web Framework

Miter is a web framework heavily influenced by Ruby on Rails and SailsJs. It is built on top of Express. Miter uses Typescript's experimental decorators to create elegant controllers and services, using dependency injection to avoid tight coupling.

Installation

Install miter using NPM.

npm install --save miter miter-cli

miter-cli is optional, but can be used to generate and run database migrations from the command line. See miter-framework/miter-cli for more details.

Example

First, create a controller:

import { Controller, Get } from 'miter';
import { Request, Response } from 'express';

@Controller()
class HelloWorldController {
    
    @Get('greet')
    async sampleRoute(req: Request, res: Response) {
        res.status(200).send(`Hello, World!`);
    }
    
}

Next, start the Miter server using Miter.launch:

import { Miter } from 'miter';
import { HelloWorldController } from './hello-world.controller.ts';

Miter.launch({
    name: 'server-name',
    port: 8080,
    router: {
        controllers: [HelloWorldController]
    }
});

After you have launched your server, navigate to localhost:8080/greet to see your route in action.

This is a simple demonstration, but you can already see how simple and easy it is to get a server up and running.

Contributing

Miter is a relatively young framework, and there are bound to be many ways that it can be improved. If you notice a bug, or would like to request a feature, feel free to create an issue. Better yet, you can fork the project and submit a pull request with the added feature.

Changelog

See what's new in recent versions of Miter.

Attribution

Special thanks to BrowserStack for generously hosting our cross-browser integration tests!

BrowserStack

Current Tags

  • 0.6.3                                ...           latest (2 years ago)

42 Versions

  • 0.6.3                                ...           2 years ago
  • 0.6.2                                ...           3 years ago
  • 0.6.1                                ...           3 years ago
  • 0.6.0                                ...           3 years ago
  • 0.5.10                                ...           3 years ago
  • 0.5.9                                ...           3 years ago
  • 0.5.8                                ...           3 years ago
  • 0.5.7                                ...           3 years ago
  • 0.5.6                                ...           3 years ago
  • 0.5.5                                ...           3 years ago
  • 0.5.4                                ...           3 years ago
  • 0.5.3                                ...           3 years ago
  • 0.5.2                                ...           3 years ago
  • 0.5.1                                ...           3 years ago
  • 0.5.0                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.4                                ...           3 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.25                                ...           4 years ago
  • 0.0.24                                ...           4 years ago
  • 0.0.23                                ...           4 years ago
  • 0.0.22                                ...           4 years ago
  • 0.0.21                                ...           4 years ago
  • 0.0.20                                ...           4 years ago
  • 0.0.19                                ...           4 years ago
  • 0.0.18                                ...           4 years ago
  • 0.0.17                                ...           4 years ago
  • 0.0.16                                ...           4 years ago
  • 0.0.15                                ...           4 years ago
  • 0.0.14                                ...           4 years ago
  • 0.0.13                                ...           4 years ago
  • 0.0.12                                ...           4 years ago
  • 0.0.11                                ...           4 years ago
  • 0.0.10                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 2
Last Day 0
Last Week 0
Last Month 1
Dependencies (25)
Dev Dependencies (17)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |