Removed ugly styling library for html

This commit is contained in:
Myx
2023-10-14 21:08:08 +02:00
parent c51bc4bb32
commit ba11822fe5
6 changed files with 77 additions and 49 deletions

View File

@@ -32,6 +32,9 @@ app.post('/upload', upload.single('myFile'), async (req, res) => {
res.send('File uploaded successfully.');
});
// create a enpoint to return a file from the sounds folder (use the file name) with as little code as possible
app.use('/sounds', express.static(path.join(__dirname, '../sounds')));
app.get('/sounds', (_req, res) => {
const fs = require('fs');
const directoryPath = path.join(__dirname, '../sounds');