当前位置:网站首页>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
边栏推荐
- Blender程序化地形制作
- Servlet3 0 + event driven for high performance long polling
- 学习笔记:Unity CustomSRP-11-Post Processing---Bloom
- 2021-09-23
- Anti crawler (0): are you still climbing naked with selenium? You're being watched! Crack webdriver anti crawler
- Barcode generation and decoding, QR code generation and decoding
- Three 之 three.js (webgl)简单实现根据点绘制线/弧线(基于LineGeometry / Line2 / LineMaterial,绘制两点基于圆心的弧线段)
- 使用zerotier让异地设备组局域网
- Three of three JS (webgl) is simple to draw lines / arcs according to points (based on linegeometry / line2 / linematerial, draw two arc segments based on the center of the circle)
- 看板快速启动指南
猜你喜欢
Routing parameters
2021 年 25 大 DevOps 工具(下)
A trinomial expression that causes a null pointer
Domain driven model DDD (III) -- using saga to manage transactions
Basic theory of Flink
#define 定义常量和宏,指针和结构体
Three 之 three.js (webgl)简单实现根据点绘制线/弧线(基于LineGeometry / Line2 / LineMaterial,绘制两点基于圆心的弧线段)
Flip coin (Blue Bridge Cup)
The 2021 IT industry project management survey report was released!
Traversal of tree
随机推荐
Unique primary key ID of tidb sub table -- solution to failure of sequence and Gorm to obtain primary key
API slow interface analysis
2022/4/22
学习笔记:Unity CustomSRP-12-HDR
何时适合进行自动化测试?(下)
看板快速启动指南
Discussion on flow restriction
configmap
MySQL circularly adds sequence numbers according to the values of a column
The 2021 IT industry project management survey report was released!
Minimum spanning tree -- unblocked project hdu1863
領域驅動模型DDD(三)——使用Saga管理事務
Three 之 three.js (webgl)简单实现根据点绘制线/弧线(基于LineGeometry / Line2 / LineMaterial,绘制两点基于圆心的弧线段)
工具在数字化转型中扮演了什么样的角色?
Solution of how to log in with mobile phone verification code in wireless network
This call when the transaction does not take effect
MySQL slow query
Summary of MySQL knowledge points
无线网怎么用手机验证码登录解决方案
Mac enters MySQL terminal command