You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1008 B
HTML
30 lines
1008 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>PocketBase Test</title>
|
|
<script src="https://unpkg.com/pocketbase@latest/dist/pocketbase.umd.js"></script>
|
|
</head>
|
|
<body>
|
|
<h1>PocketBase Client Test</h1>
|
|
<div id="test"></div>
|
|
<script>
|
|
(async function() {
|
|
// Укажите адрес вашего PocketBase сервера (стандартно http://127.0.0.1:8090)
|
|
const pb = new PocketBase('http://127.0.0.1:8090');
|
|
//const userData = await pb.collection('rmias').authWithPassword('tad17@list.ru', '0987654321');
|
|
const result = await pb.collection('rmias').getList(1, 10)
|
|
console.log("result:", result)
|
|
const ul = document.createElement('ul');
|
|
const container = document.getElementById('test');
|
|
for (const r of result.items) {
|
|
const li = document.createElement('li');
|
|
li.innerHTML = r.patientName
|
|
ul.appendChild(li);
|
|
}
|
|
container.appendChild(ul);
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|