UNPKG
@revoloo/cypress6
Version:
latest (1.0.0)
1.0.0
Cypress.io end to end testing tool
github.com/cypress-io/cypress
cypress-io/cypress
@revoloo/cypress6
/
packages
/
server
/
lib
/
controllers
/
static.js
12 lines
(9 loc)
•
235 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
const
send =
require
(
'send'
)
const
staticPkg =
require
(
'@packages/static'
)
module
.
exports
= {
handle
(req, res) {
const
pathToFile = staticPkg.
getPathToDist
(req.
params
[
0
])
return
send
(req, pathToFile) .
pipe
(res) }, }