Upload files to ''
This commit is contained in:
parent
ccebba2825
commit
b02cdcefa7
29
index.html
Normal file
29
index.html
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<!doctype html>
|
||||||
|
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
|
||||||
|
<title>SoundBox du Channel Ultime</title>
|
||||||
|
<meta name="description" content="SoundBox du Channel Ultime">
|
||||||
|
<meta name="author" content="Creuzdos">
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.css">
|
||||||
|
<link rel="stylesheet" href="css/styles.css">
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1> SoundBox du Channel Ultime </h1>
|
||||||
|
<div id="app" class="row">
|
||||||
|
<div v-for="son in listeDeSons" class="col s6 m4 l3 xl2 son">
|
||||||
|
<div class="titre">{{son.replace(".mp3","")}}</div>
|
||||||
|
<audio controls>
|
||||||
|
<source v-bind:src="'Sounds/' + son" type="audio/mpeg">
|
||||||
|
</audio>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
|
||||||
|
<script src="js/vueApp.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
15
index.js
Normal file
15
index.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
const express = require('express');
|
||||||
|
const fs = require('fs');
|
||||||
|
let app = express();
|
||||||
|
app.use(express.static('.'));
|
||||||
|
app.get('/', function(request, response){
|
||||||
|
response.sendFile('index.html');
|
||||||
|
});
|
||||||
|
|
||||||
|
app.get('/Sounds', function(request, response){
|
||||||
|
const dir = fs.readdirSync('./Sounds');
|
||||||
|
response.send(dir);
|
||||||
|
//console.log(dir);
|
||||||
|
});
|
||||||
|
|
||||||
|
app.listen(3000);
|
Loading…
Reference in New Issue
Block a user