view serve-files.js @ 33:6ee4c73decf4

fix playability of vids with # in their titles
author drewp@bigasterisk.com
date Mon, 26 Aug 2024 22:34:28 -0700
parents 78c1a2983010
children ed16fdbb3996
line wrap: on
line source

const express = require('express')
const serveIndex = require('serve-index')

const app = express()

app.use('/video/files',
    express.static('/data'), // serves file content
    serveIndex('/data', { 'icons': true }) // serves dir listings
)

app.listen(8003)