diff --git a/autopost/posteur.sh b/autopost/posteur.sh index 56d2f92..653ee5f 100644 --- a/autopost/posteur.sh +++ b/autopost/posteur.sh @@ -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}' \ diff --git a/autopost/server.js b/autopost/server.js index bf4a8bd..db97fee 100644 --- a/autopost/server.js +++ b/autopost/server.js @@ -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) => {