当前位置:网站首页>The prefix of static of egg can be modified, including boots
The prefix of static of egg can be modified, including boots
2022-04-23 05:22:00 【process1212】
Don't talk nonsense , Go straight to the code :( I cheated the traffic through this article , Ha ha ha ha ha ha ha ha ha ha ha ), Thank you for provoking me ~
'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://yzsam.com/2022/04/202204230519445912.html
边栏推荐
- JSP-----JSP简介
- Some experience in using MySQL / tidb database [slowly updating...]
- Click the Add button - a box appears (similar to adding learning experience - undergraduate - Graduate)
- Where, on when MySQL external connection is used
- Study notes: unity customsrp-11-post processing --- bloom
- 无线网怎么用手机验证码登录解决方案
- Requirements for SQL server to retrieve SQL and user information
- Mariadb的半同步复制
- Redis persistence
- How does PostgreSQL parse URLs
猜你喜欢

MySQL external connection, internal connection, self connection, natural connection, cross connection

CPT 104_TTL 09

Cross domain CORS relationship~

CPT 104_ TTL 09

Kanban Quick Start Guide

Requirements for SQL server to retrieve SQL and user information

2022年最热门的招聘技术技能是什么,您绝对想不到

C test calls the paddlesharp module to recognize pictures and words

MFC实现资源单独Dll实现

Master-slave replication of MariaDB database
随机推荐
How to realize adaptive layout
Data management of basic operation of mairadb database
2021-11-01
Minimum spanning tree -- unblocked project hdu1863
引入精益管理方式,需要提前做到这九点
egg中的cors和proxy(づ ̄3 ̄)づ╭~踩坑填坑的过程~ToT~
egg中的多进程模型--egg文档搬运工
Graphics.FromImage报错“Graphics object cannot be created from an image that has an indexed pixel ...”
使用 Kears 实现ResNet-34 CNN
Domain driven model DDD (III) -- using saga to manage transactions
How does PostgreSQL parse URLs
我这位老程序员对时代危险和机遇的一点感悟?
Unique primary key ID of tidb sub table -- solution to failure of sequence and Gorm to obtain primary key
MFC实现资源单独Dll实现
5 minutes to understand MySQL row column conversion
MFC implementation resources are implemented separately by DLL
Some experience in using MySQL / tidb database [slowly updating...]
Output string in reverse order
DevOps生命周期,你想知道的全都在这里了!
Grpc long connection keepalive