coreection chargement js server.js
This commit is contained in:
parent
abc64501e2
commit
c6c92bf1ef
@ -60,7 +60,7 @@ while true; do
|
||||
echo -e "${VERT}UPLOAD SUR USENET${NORMAL}"
|
||||
files=( ${FILESANSEXT}.* )
|
||||
checkusenet
|
||||
script -q -c \
|
||||
script -q -c \
|
||||
"nyuu -h ${NG_HOST} -P ${NG_PORT} -S -u ${NG_USER} -p ${NG_PASS} -n ${NG_NBR_CONN} \
|
||||
-g alt.binaries.boneless -o '${DOSSIER_NZB_ATTENTE}${FILESANSEXT}.nzb' \
|
||||
--nzb-title '${FILESANSEXT}' \
|
||||
|
||||
@ -9,6 +9,7 @@ const os = require('os');
|
||||
const config = require('./config');
|
||||
const db = require('./db');
|
||||
|
||||
|
||||
db.testConnection(); // vérification au démarrage
|
||||
|
||||
const app = express();
|
||||
@ -27,8 +28,14 @@ app.use(express.static('public'));
|
||||
|
||||
const autopostRouter = express.Router();
|
||||
|
||||
autopostRouter.use('/js', express.static(path.join(__dirname, '../node_modules/@tailwindcss/browser/dist')));
|
||||
autopostRouter.use('/jquery', express.static(path.join(__dirname, '../node_modules/jquery/dist')));
|
||||
app.use('/js', express.static(
|
||||
path.join(__dirname, '../node_modules/@tailwindcss/browser/dist'),
|
||||
{ setHeaders: (res) => res.type('application/javascript') } // optionnel
|
||||
));
|
||||
app.use('/jquery', express.static(
|
||||
path.join(__dirname, '../node_modules/jquery/dist'),
|
||||
{ setHeaders: (res) => res.type('application/javascript') } // optionnel
|
||||
));
|
||||
|
||||
// --------------------------- Auth non protégée -----------------------------
|
||||
autopostRouter.get('/login', (req, res) => {
|
||||
@ -39,7 +46,7 @@ autopostRouter.get('/login', (req, res) => {
|
||||
<meta charset="UTF-8">
|
||||
<title>Login</title>
|
||||
<!-- Inclusion de Tailwind CSS via le CDN -->
|
||||
<script src="js/index.global.js"></script>
|
||||
<script src="/js/index.global.js"></script>
|
||||
</head>
|
||||
<body class="bg-slate-900 flex items-center justify-center min-h-screen">
|
||||
<div class="bg-slate-700 p-8 rounded-lg shadow-md w-80">
|
||||
@ -69,6 +76,7 @@ autopostRouter.post('/login', (req, res) => {
|
||||
res.send('Identifiants invalides. <a href="/autopost/login">Réessayer</a>');
|
||||
}
|
||||
});
|
||||
|
||||
autopostRouter.get('/logout', (req, res) => {
|
||||
req.session.destroy();
|
||||
res.redirect('/autopost/login');
|
||||
@ -106,8 +114,8 @@ autopostRouter.get('/', async (req, res) => {
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Suivi Autopost</title>
|
||||
<script src="js/index.global.js"></script>
|
||||
<script src="jquery/jquery.min.js"></script>
|
||||
<script src="/js/index.global.js"></script>
|
||||
<script src="/jquery/jquery.min.js"></script>
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap" rel="stylesheet">
|
||||
</head>
|
||||
<body class="bg-slate-900 text-white font-sans p-4">
|
||||
@ -171,6 +179,10 @@ autopostRouter.get('/', async (req, res) => {
|
||||
statusText = 'DEJA DISPONIBLE';
|
||||
statusClass = 'bg-pink-300 text-black font-bold';
|
||||
break;
|
||||
case 4:
|
||||
statusText = 'EN COURS';
|
||||
statusClass = 'bg-yellow-300 text-black font-bold';
|
||||
break;
|
||||
default:
|
||||
statusText = 'INCONNU';
|
||||
}
|
||||
@ -269,6 +281,10 @@ autopostRouter.get('/', async (req, res) => {
|
||||
statusText = 'DEJA DISPONIBLE';
|
||||
statusClass = 'bg-pink-300 text-black font-bold';
|
||||
break;
|
||||
case 4:
|
||||
statusText = 'EN COURS';
|
||||
statusClass = 'bg-yellow-300 text-black font-bold';
|
||||
break;
|
||||
default:
|
||||
statusText = 'INCONNU';
|
||||
}
|
||||
@ -420,6 +436,10 @@ autopostRouter.get('/', async (req, res) => {
|
||||
statusText = 'DEJA DISPONIBLE';
|
||||
statusClass = 'bg-pink-300 text-black font-bold';
|
||||
break;
|
||||
case 4:
|
||||
statusText = 'EN COURS';
|
||||
statusClass = 'bg-yellow-300 text-black font-bold';
|
||||
break;
|
||||
default:
|
||||
statusText = 'INCONNU';
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user