Skip to content

TypeScript-Web-Framework/ts-web-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version Known Vulnerabilities dependencies Status devDependencies Status Build status Codeship Status for TypeScript-Web-Framework/ts-web-framework Build Status Test Coverage Maintainability Inline docs contributions welcome HitCount GitHub issues GitHub stars GitHub license

NPM Greenkeeper badge

TypeScript Web Framework

Ideal to create Web Services.

Requeriments

  • Nodejs 6+
  • TypeScript 2.2+

Install(Windows, Linux and OSX)

First, install TypeScript Web Framework CLI

npm install -g twf-cli

Features

Command Line Interface

  • Own command line interface

Security

  • CSRF Prevention
  • Expect-CT
  • Content Security Policy
  • DNS Prefetch Control
  • X-Frame-Options
  • Hiden Powerd By
  • HTTP Public Key Pinning
  • HTTP Strict Transport Security
  • X-Download-Options for IE8+
  • No Cache
  • No Sniff
  • Referrer-Policy
  • XSS Prevention
  • AES-256-CTR, AES-256-GCM, AES-256-CBC Encrypt/Decrypt implementation
  • Single Binary file compilation
  • Denial-Of-Service Prevention

Easy Custom Responses

  • httpOk - 200
  • httpCreated - 201
  • httpAccepted - 202
  • httpRedirect - 301 & 307
  • httpBadRequest - 400
  • httpUnauthorized - 401
  • httpForbidden - 403
  • httpNotFound - 404
  • httpMethodNotAllowed - 405

Cross-platform

  • Microsoft Windows(XP, Vista, 8, 10, ...)
  • Linux (Ubuntu, Centos, Fedora, RedHat, ...)
  • OSX

Getting Started

Install TWF-CLI(TypeScript Web Framework Command Line Interface)

npm install -g twf-cli

Create you first project

twf start my-project

Create you first controller

Using TWF-CLI

twf add controller hello-world hello/world

Check you own controller

@Api('/api')
export class HelloWorldController extends Controller {
    @Http("/hello/world") // you route is : GET /api/hello/world
    public index () {
        this.httpOk();
    }
}

Commands

Compile

twf build

Test

twf test

Run/Serve

twf serve

Verify

twf verify

Package Single Binany

twf package

Licence

MIT License

Copyright (c) 2018 Olaf Erlandsen C.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.