File tree 1 file changed +3
-3
lines changed
examples/simple-player/server/src/library
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import path from 'path';
5
5
import fs from 'fs' ;
6
6
7
7
// vendor
8
- import express from 'express' ;
8
+ import express , { Response , Request } from 'express' ;
9
9
import { contentType } from 'mime-types' ;
10
10
11
11
// hack because __dirname is not defined
@@ -41,7 +41,7 @@ export class Server {
41
41
this . application . use ( '/static' , express . static ( ROOTPATH + '/../../../assets' ) ) ;
42
42
43
43
// streaming songs
44
- this . application . get ( '/music/:song' , ( request : express . Request , response : express . Response ) => {
44
+ this . application . get ( '/music/:song' , ( request : Request , response : Response ) => {
45
45
46
46
const fullPath = ROOTPATH + '/../../../assets/music/' + request . params . song
47
47
const size = fs . statSync ( fullPath ) . size
@@ -117,7 +117,7 @@ export class Server {
117
117
this . application . get ( '/' , ( request : express . Request , response : express . Response ) => {
118
118
119
119
// options list: http://expressjs.com/en/api.html#res.sendFile
120
- const mainPageSendfileOptions = {
120
+ const mainPageSendfileOptions : unknown = {
121
121
root : path . join ( ROOTPATH , '..' , 'html' ) ,
122
122
dotfiles : 'deny' ,
123
123
headers : {
You can’t perform that action at this time.
0 commit comments