当前位置:网站首页>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
边栏推荐
- Docker installation and mysql5 7 installation
- Traversal of tree
- Project manager's thinking mode worth trying: project success equation
- 看板快速启动指南
- Simple application of parallel search set (red alarm)
- Study notes: unity customsrp-13-colorgrading
- Master-slave replication of MariaDB database
- Barcode generation and decoding, QR code generation and decoding
- Uglifyjs compress JS
- MySQL external connection, internal connection, self connection, natural connection, cross connection
猜你喜欢

了解 DevOps,必读这十本书!

At pgconf Asia Chinese technology forum, listen to Tencent cloud experts' in-depth understanding of database technology

Top 25 Devops tools in 2021 (Part 2)

What role do tools play in digital transformation?

Discussion on flow restriction

Uglifyjs compress JS

Cloud computing and cloud native architecture design of openshift

DevOps生命周期,你想知道的全都在这里了!

Transaction isolation level of MySQL transactions

When is it appropriate for automated testing? (bottom)
随机推荐
WTL self drawn control library (cqscheckcomboxbox)
MySQL uses or to query SQL, and SQL execution is very slow
Jupyter notebook crawling web pages
Simple application of parallel search set (red alarm)
MySQL 慢查询
Chapter I overall project management of information system project manager summary
Locks and transactions in MySQL
The 2021 IT industry project management survey report was released!
开源规则引擎——ice:致力于解决灵活繁复的硬编码问题
Study notes: unity customsrp-10-point and spot shadows
Barcode generation and decoding, QR code generation and decoding
MySQL external connection, internal connection, self connection, natural connection, cross connection
On distributed lock
Various ways of writing timed tasks of small programs
Cross border e-commerce | Facebook and instagram: which social media is more suitable for you?
使用 Kears 实现ResNet-34 CNN
Three 之 three.js (webgl)旋转属性函数的简单整理,以及基于此实现绕轴旋转的简单案例
In aggregated query without group by, expression 1 of select list contains nonaggregated column
Get the number of days between dates, get the Chinese date, get the date of the next Monday of the date, get the working day, get the rest day
看板快速启动指南