Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

159
Views
Cómo encontrar todos los directorios en un directorio en "vanilla js" (JS NO PHP)

Estoy haciendo un pequeño conjunto de 'aplicaciones' para mi hermanito (como una experiencia de aprendizaje)

pero tengo un problema... no puedo obtener una lista de todas las aplicaciones

esto (por supuesto) significa que necesito obtener todos los directorios en un directorio, pero lo hice en vanilla js y no sé mucho sobre solicitudes http

también estaré bien si responde una forma de usar fs en la interfaz

(si hace clic en los enlaces, se supone que debe redirigirlo ... eso solo funciona para mí, ya que no puedo y no necesito poner TODO el código)

 const apps = ['foo', 'bar'] // this is where all the apps are supposed to be const ul = document.querySelector("ul") apps.forEach(app => { const el = document.createElement("li") el.innerHTML = `<a href="/apps/${app}">${app}</a>` ul.appendChild(el) })
 @import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@600&display=swap'); * { font-family: 'Open Sans', sans-serif; margin: 0; padding: 0; color: white; text-align: center; background-color: #333; border: none; font-size: large; } ul { margin-top: 5%; } li, a { list-style: none; text-transform: capitalize; text-decoration: none; margin-bottom: 1%; transition: color 500ms; } a:hover { color: gray; }
 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="style.css"> <link rel="icon" type="image/x-icon" href="favicon.ico"> <script src="script.js" defer></script> <title>Webbed Tools</title> </head> <body> <ul></ul> </body> </html>

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Simplemente di, no puedes. Es una muy mala práctica si haces esto para una aplicación web frontend, porque puede ser potencialmente vulnerable en términos de seguridad.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!