2.0.7 • Published 6 years ago

hinos v2.0.7

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

hinos

Pure nodejs framework, EXTREME FAST and LIGHT WEIGHT. It is optimized for large projects. And of course, it get best performance "hinos" is not bundled with any middleware. It's only nodejs native

Installation

npm i hinos -S

Examples

Typescript

import { Server, Context } from 'hinos';

const yourMiddleware = async (ctx: Context, next: Function) => {
    // Return error
    if(ctx.query.isError) ctx.throws(401, 'error');
    // Return data
    ctx.data = {
        msg: 'Hello world!'
    }
    await next();
}

Server.use(yourMiddleware);

Server.listen(1337, () => {
    console.log('Server is listening at port %d', 1337);
});

Nodejs

const hinosserver = require("hinos");
const Server = hinosserver.Server;

const yourMiddleware = async (ctx, next) => {
    // Return error
    if(ctx.query.isError) ctx.throws(401, 'error');
    // Return data
    ctx.data = {
        msg: 'Hello world!'
    }
    await next();
}

Server.use(yourMiddleware);

Server.listen(1337, () => {
    console.log('Started');
});
2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

2.0.0-alpha1

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.6

6 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago