@shoio/server
TypeScript icon, indicating that this package has built-in type declarations

2.0.8 • Public • Published

Shoio Server

Installing

npm install --save @shoio/core @shoio/server

Getting Started

import { Shoio } from "@shoio/core";
import { ShoioHttpServer } from "@shoio/server";

class PingService extends Shoio {

    mountRouter(http) {
        http.get('ping', this.ping)
    }

    routerMounted( server, config ) {
        console.log( 'Server running in port', config.port )
    }

    ping() {
        return 'pong'
    }

}

const app = new PingService({
    plugins: [
        new ShoioHttpServer({boot: true})  
    ]
})

app.mount()

Readme

Keywords

none

Package Sidebar

Install

npm i @shoio/server

Weekly Downloads

1

Version

2.0.8

License

MIT

Unpacked Size

23.1 kB

Total Files

9

Last publish

Collaborators

  • brendonferreira