@kenote/config
TypeScript icon, indicating that this package has built-in type declarations

1.0.40 • Public • Published

@kenote/config

Get profile module

NPM Version NPM Downloads Gratipay

使用方法

data/config.yaml

host: localhost

port: 3000

site_name: 站点名称

redis:
  host: 127.0.0.1
  port: 6379
  db: 0

data/index.js

module.exports = {
  a: 1
}

app.ts

import { loadConfig, asyncRequire } from '@kenote/config'

/**
 * 读取配置文件
 */
const config = loadConfig('data')
/**
 * 异步导入JS
 */
const ct = asyncRequire('./data')

MIT License.

Readme

Keywords

Package Sidebar

Install

npm i @kenote/config

Weekly Downloads

21

Version

1.0.40

License

MIT

Unpacked Size

74.5 kB

Total Files

35

Last publish

Collaborators

  • thondery