test server NUXT_ env
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import { syncCardsWithDatabase } from '../services/cardSync.service'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const config = useRuntimeConfig()
|
||||
const folderPath = config.pathFiles || process.env.PATH_FILES
|
||||
const folderPath = process.env.NUXT_PATH_FILES
|
||||
|
||||
if (!folderPath) {
|
||||
throw createError({
|
||||
statusCode: 500,
|
||||
message: 'PATH_FILES not configured'
|
||||
message: 'NUXT_PATH_FILES not configured'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { syncCardsWithDatabase } from '../../services/cardSync.service'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const config = useRuntimeConfig()
|
||||
const folderPath = config.pathFiles || process.env.PATH_FILES || 'mnt/media/files/music'
|
||||
const folderPath = process.env.NUXT_PATH_FILES
|
||||
|
||||
try {
|
||||
const result = await syncCardsWithDatabase(folderPath)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { scanMusicFolder } from '../../utils/fileScanner'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const config = useRuntimeConfig()
|
||||
const folderPath = config.pathFiles || process.env.PATH_FILES || 'mnt/media/files/music'
|
||||
const folderPath = process.env.NUXT_PATH_FILES
|
||||
|
||||
try {
|
||||
// Test 1: Vérifier que le dossier existe
|
||||
|
||||
Reference in New Issue
Block a user