当前位置:网站首页>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
边栏推荐
- 7-4 is it too fat (10 points) PTA
- calendar. Pit point of getactualmaximum (calendar. Day_of_month)
- API slow interface analysis
- App Store年交易额100万美元只缴15%佣金,中小开发者心里很矛盾
- 2021-09-23
- Various ways of writing timed tasks of small programs
- 2022年最热门的招聘技术技能是什么,您绝对想不到
- Five key technologies to improve the devsecops framework
- Cross border e-commerce | Facebook and instagram: which social media is more suitable for you?
- When is it appropriate for automated testing? (bottom)
猜你喜欢

When is it appropriate for automated testing? (bottom)

#define 定义常量和宏,指针和结构体

MySQL slow query

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

One month countdown, pgconf What are the highlights of the latest outlook of asia2021 Asian Conference?

Three 之 three.js (webgl)简单实现根据点绘制线/弧线(基于LineGeometry / Line2 / LineMaterial,绘制两点基于圆心的弧线段)

MySQL foreign key constraint

源码剖析Redis中如何使用跳表的

Where, on when MySQL external connection is used

Redis persistence
随机推荐
2021-09-23
Luogu p2731 horse riding fence repair
Publish your own wheel - pypi packaging upload practice
Basic knowledge of vegetable chicken database
Define defines constants and macros, pointers and structures
App Store年交易额100万美元只缴15%佣金,中小开发者心里很矛盾
The 2021 more reading report was released, and the book consumption potential of post-95 and Post-00 rose
Data security has become a hidden danger. Let's see how vivo can make "user data" armor again
Some experience in using MySQL / tidb database [slowly updating...]
引入精益管理方式,需要提前做到这九点
Good simple recursive problem, string recursive training
configmap
学习笔记:Unity CustomSRP-12-HDR
Streamexecutionenvironment of Flink source code
Let the LAN group use the remote device
Logrus set log format and output function name
JSP -- Introduction to JSP
Blender程序化地形制作
Nacos source code startup error report solution
2022年最热门的招聘技术技能是什么,您绝对想不到