当前位置:网站首页>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
边栏推荐
- Minimum spanning tree -- unblocked project hdu1863
- 工具在数字化转型中扮演了什么样的角色?
- Top 25 Devops tools in 2021 (Part 2)
- 【openh264】cmake: msopenh264-static
- Luogu p2731 horse riding fence repair
- Swing display time (click once to display once)
- Chapter II project scope management of information system project manager summary
- Grpc long connection keepalive
- Study notes: unity customsrp-13-colorgrading
- WTL 自绘控件库 (CQsCheckComboxBox)
猜你喜欢

改进DevSecOps框架的 5 大关键技术
![[2022 ICLR] Pyramid: low complexity pyramid attention for long range spatiotemporal sequence modeling and prediction](/img/7c/51ac43080d9721f1bdc1cd78cd685b.png)
[2022 ICLR] Pyramid: low complexity pyramid attention for long range spatiotemporal sequence modeling and prediction

PIP free export with path (@ file: / / /) notes

Nacos source code startup error report solution

Uglifyjs compress JS

我这位老程序员对时代危险和机遇的一点感悟?

Good test data management, in the end how to do?

Routing parameters

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

Restful toolkit of idea plug-in
随机推荐
At pgconf Asia Chinese technology forum, listen to Tencent cloud experts' in-depth understanding of database technology
Domain driven model DDD (III) -- using saga to manage transactions
API slow interface analysis
学习笔记:Unity CustomSRP-13-ColorGrading
看板快速启动指南
Golang memory escape
Various ways of writing timed tasks of small programs
Swing display time (click once to display once)
Modèle axé sur le domaine DDD (III) - gestion des transactions à l'aide de Saga
SQLyog的基本使用
Summary of MySQL knowledge points
Uglifyjs compress JS
Summary of R & D technology
学习笔记:Unity CustomSRP-10-Point and Spot Shadows
Asynchronous iterator & asynchronous generator & asynchronous context manager
MySQL views the SQL statement details executed by the optimizer
C language hash dictionary and notes
Graphics.FromImage报错“Graphics object cannot be created from an image that has an indexed pixel ...”
Live delivery form template - automatically display pictures - automatically associate series products
Restful toolkit of idea plug-in