mares-meta-binder

0.0.1 • Public • Published

mares-meta-binder

metafile 을 바인드해서 사용하는 모듈입니다. express.js 전용 미들웨어입니다.

Installation

npm install --save sg-localization-selector

Examples

const metaBinder = require('mares-meta-binder')
const express = require('express');
const app = express();
 
let meta = {
    "defaultLocale": "KR",
    "defaultLanguage": "ko",
    "locales": {
        "KR": {
            "name": "대한민국",
            "enName": "Korea",
            "code": "+82",
            "timeGap": 9
        }
    },
    "languages" : {
        "ko" : {
            "name" : "한국어",
            "enName" : "KOREAN",
            "countries" : ["KR"]
        }
    }
};
 
app.use(metaBinder(meta))

Usage

(req, res, next) => {
    console.log(req.metaData)
}

Package Sidebar

Install

npm i mares-meta-binder

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

1.45 kB

Total Files

3

Last publish

Collaborators

  • piorio0919