mirror of
https://github.com/cypress-io/cypress.git
synced 2025-12-30 02:59:46 -06:00
13 lines
316 B
TypeScript
13 lines
316 B
TypeScript
import send from 'send'
|
|
import type { Request, Response } from 'express'
|
|
import { getPathToDist } from '@packages/resolve-dist'
|
|
|
|
export const staticCtrl = {
|
|
handle (req: Request, res: Response) {
|
|
const pathToFile = getPathToDist('static', req.params[0])
|
|
|
|
return send(req, pathToFile)
|
|
.pipe(res)
|
|
},
|
|
}
|