Skip to content

bap-node-microframework/node-microframework-ping-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ping-module

A sample module ping/pong

Installing

To install and add the dependency to the package.json, run the following command:

npm install bap-node-microframework-ping-module --save

Using

To activate the ping module, write the following code in app/kernel.ts:

// app/kernel.ts
...
import { PingModule } from "bap-node-microframework-ping-module";
...

export class Kernel extends KernelInterface {

    boot(app, io: SocketIO.Server) {
        ...
        new PingModule(app, io);
        ...
    }
}
...

Now, if you go to http://localhost:3000/ping, you will get:

{"ping": "pong"}

About

A sample module ping/pong

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published