UNPKG

project-indexer

Version:

Local project indexer with browser trigger support

33 lines (29 loc) 1.12 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Project Indexer</title> </head> <body> <h1>Indexer Dashboard</h1> <label>Project Path: <input id="dir" value="/path/to/your/codebase" /></label><br/> <label>Project Name: <input id="project" value="my-project" /></label><br/> <label>Server URL: <input id="server" value="http://localhost:3000" /></label><br/> <button onclick="startIndexing()">Start Indexing</button> <pre id="log"></pre> <script> async function startIndexing() { const dir = document.getElementById('dir').value; const project = document.getElementById('project').value; const server = document.getElementById('server').value; const res = await fetch('http://localhost:5666/index', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ dir, projectName: project, serverUrl: server }) }); const data = await res.json(); document.getElementById('log').textContent = JSON.stringify(data, null, 2); } </script> </body> </html>