hinos-log
TypeScript icon, indicating that this package has built-in type declarations

2.0.5 • Public • Published

hinos-log

Handle log for appliction base on log4js

Install

npm i hinos-log -S

Examples

Typescript

import { Server } from 'hinos';
import { route } from 'hinos-route';
import { serve } from 'hinos-serve';
import { Logger } from 'hinos-log/lib/logger';

Logger(AppConfig.log)
Server.use(serve({
    '/upload': path.join(__dirname, '..', 'assets', 'upload')
}));
Server.use(cors());
Server.use(route(path.join(__dirname, 'controller')));

Javascript

const hinos = require("hinos");
const hinosRoute = require("hinos-route");
const hinosServe = require("hinos-serve");
const hinosCors = require("hinos-cors");

hinos.Server.use(hinosServe.serve({
    '/images': path.join(__dirname, 'path to folder which contains resource files'),
    '/files': path.join(__dirname, 'path to folder which contains resource files'),
}));
hinos.Server.use(hinosCors.cors());
hinos.Server.use(hinosRoute.route(path.join(__dirname, 'controller')));

Readme

Keywords

none

Package Sidebar

Install

npm i hinos-log

Weekly Downloads

0

Version

2.0.5

License

ISC

Unpacked Size

14.5 kB

Total Files

10

Last publish

Collaborators

  • doanthuanthanh88