Filip Borum Poulsen 2 years ago
parent 688e1e31cd
commit f04358a71c

@ -91,7 +91,7 @@ function startVideo(path) {
});
}
// fs.mkdirSync('/video', { recursive: true });
fs.mkdirSync('/video', { recursive: true });
app.post('/play', (req, res) => {
if (process) {
@ -125,7 +125,7 @@ app.post('/upload', function (req, res) {
// The name of the input field (i.e. "sampleFile") is used to retrieve the uploaded file
const uploadPath = path.join(__dirname, '/public/videos/');
req.files.file.mv(uploadPath + req.files.file.name, function (err) {
req.files.file.mv(uploadPath + "video.mp4", function (err) {
if (err) {
return res.status(500);
}

@ -2,17 +2,13 @@
Description=Video Player
After=multi-user.target
StartLimitIntervalSec=500
StartLimitBurst=50
[Service]
WorkingDirectory=/home/steady/video-player
ExecStart=node /home/steady/video-player/index.js
Environment=DISPLAY=:0
User=1000
Group=1000
Restart=on-failure
RestartSec=5s
Restart=always
[Install]
WantedBy=multi-user.target
Loading…
Cancel
Save