当前位置:网站首页>egg的static的前缀是可以修改惹,靴靴
egg的static的前缀是可以修改惹,靴靴
2022-04-23 05:20:00 【process1212】
废话少说,直接上代码:(我是通过这篇文章来骗访问量的,哈哈哈哈哈哈哈哈嗝),谢谢大家惹~
'use strict';
const path = require('path');
module.exports = appInfo => {
const exports = {};
/**
* Static file serve
*
* @member Config#static
* @property {String} prefix - `/public/` by default
* @property {String} dir - static files store dir, `${baseDir}/app/public` by default
* @property {Number} maxAge - cache max age, default is 0
* @see https://github.com/koajs/static-cache
*/
exports.static = {
prefix: '/public/',
dir: path.join(appInfo.baseDir, 'app/public'),
// support lazy load
dynamic: true,
preload: false,
buffer: false,
maxFiles: 1000,
};
return exports;
};
版权声明
本文为[process1212]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_33589252/article/details/85259677
边栏推荐
- Simple application of parallel search set (red alarm)
- Some experience in using MySQL / tidb database [slowly updating...]
- Acid of MySQL transaction
- 《2021年IT行业项目管理调查报告》重磅发布!
- 【openh264】cmake: msopenh264-static
- The introduction of lean management needs to achieve these nine points in advance
- 如何在Word中添加漂亮的代码块 | 很全的方法整理和比较
- 引入精益管理方式,需要提前做到这九点
- JS array common methods
- Grpc long connection keepalive
猜你喜欢

2021 年 25 大 DevOps 工具(下)

Master-slave replication of MariaDB database

引入精益管理方式,需要提前做到这九点

PIP free export with path (@ file: / / /) notes
![[2021] Spatio-Temporal Graph Contrastive Learning](/img/7d/67a0bfa0adecee24bbe291a25ae906.png)
[2021] Spatio-Temporal Graph Contrastive Learning

无线网怎么用手机验证码登录解决方案

The WebService interface writes and publishes calls to the WebService interface (2)

JS Array常见方法

低代码和无代码的注意事项

4 个最常见的自动化测试挑战及应对措施
随机推荐
无线网怎么用手机验证码登录解决方案
Redis lost key and bigkey
工具在数字化转型中扮演了什么样的角色?
2021 年 25 大 DevOps 工具(下)
Grpc long connection keepalive
Using MySQL with Oracle
Good test data management, in the end how to do?
MySQL uses or to query SQL, and SQL execution is very slow
WTL 自绘控件库 (CQsCheckComboxBox)
低代码和无代码的注意事项
MySQL slow query
My old programmer's perception of the dangers and opportunities of the times?
Golang memory escape
mariadb数据库的主从复制
云计算与云原生 — OpenShift 的架构设计
calendar. Pit point of getactualmaximum (calendar. Day_of_month)
[untitled] kimpei kdboxpro's cool running lantern coexists with beauty and strength
mysql5. 7. X data authorization leads to 1141
青岛敏捷之旅,来了!
《2021年IT行业项目管理调查报告》重磅发布!