hk-serv
The project was created with typescript.
Last updated 5 months ago by hketen .
ISC · Original npm · Tarball · package.json
$ cnpm install hk-serv 
SYNC missed versions from official npm registry.

#NodeJS restful & socket server

The project was created with typescript.

##How To Use

import {ApplicationServer} from 'hk-serv';

class App extends ApplicationServer {

    async injectRequest(): Promise<{ [key: string]: any }> {
        const injects: { [key: string]: any } = {};

        ...

        return injects;
    }

    async registerRoutes(): Promise<any[]> {
        return []; // CoreRoutes.class
    }

    async registerSockets(): Promise<any[]> {
        return []];
    }
}

(async () => {

    const app = new App();

    await app.listen();

})();

Webpack

...
externals: [
      nodeExternals({
        whitelist: ['hk-serv']
      }),
],
...
...
module: {
    rules: [
        ...
        {
            test: /.ts?$/,
            use: [
              {
                loader: 'ts-loader',
                options: {
                  allowTsInNodeModules: true // IMPORTANT
                }
              }
            ]
        },
        ...
    ]
},
...

Current Tags

  • 0.1.16                                ...           latest (5 months ago)

16 Versions

  • 0.1.16                                ...           5 months ago
  • 0.1.15                                ...           5 months ago
  • 0.1.14                                ...           5 months ago
  • 0.1.13                                ...           5 months ago
  • 0.1.12                                ...           5 months ago
  • 0.1.11                                ...           5 months ago
  • 0.1.10                                ...           5 months ago
  • 0.1.9                                ...           5 months ago
  • 0.1.7                                ...           5 months ago
  • 0.1.8                                ...           5 months ago
  • 0.1.5                                ...           5 months ago
  • 0.1.4                                ...           6 months ago
  • 0.1.3                                ...           6 months ago
  • 0.1.2                                ...           6 months ago
  • 0.1.1                                ...           6 months ago
  • 0.1.0                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 16
Dependencies (41)
Dev Dependencies (19)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |