Tutorials > Signed-in server catalog (password grant + web setup) > Step 2: The plugin files PLUGIN.JS (1/2) CrossPoint.registerPlugin(async (container, api) => { const $ = (s) => container.querySelector(s); const b64 = (t) => { let s = ''; for (const c of new TextEncoder().encode(t)) s += String.fromCharCode(c); return btoa(s); }; const write = (name, obj) => api.writeFile(`${api.dir}/${name}`, b64(JSON.stringify(obj))); const read = async (name) => { const r = await fetch(api.pluginFile(name)); return r.ok ? r.json() : {}; }; container.innerHTML = `

Mock Library

Server
Username
Password

`; const out = (m, ok = true) => { $('[data-out]').textContent = m; $('[data-out]').style.color = ok ? 'var(--success-color)' : 'var(--danger-color)'; }; const cfg = await read('config.json'); Next: 06 plugin.js (2/2)