1.0.0 • Published 6 months ago
@hx-midway/static-file v1.0.0
使用说明
- 介绍
静态文件服务, 支持自动扫描 static dirs 目录下的静态文件, 并提供访问路径,
/path/to/static/file/index.html => /static/path/to/static/file
/path/to/static/file/index.ejs => /static/path/to/static/file
- 安装
npm install @hx-midway/static-file --save
- 使用
import * as staticFile from '@hx-midway/static-file';
@Configuration({
imports: [
koa,
staticFile
],
importConfigs: [
join(__dirname, 'config')
]
})
export class MainConfiguration { }
- 配置同
@midwayjs/static-file
1.0.0
6 months ago