Public
Like
5
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Manage your vals from a webdav client (ex: https://cyberduck.io/)
⚠️ some webdav operations are not supported, so support can vary between clients.
Click "Create Val" on the code block, and change it's type to http.
import { basicAuth } from "https://esm.town/v/pomdtr/basicAuth";
import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
import { serveVals } from "https://esm.town/v/pomdtr/webdavServer";
export default basicAuth(serveVals, {
verifyUser: (user) => {
return verifyToken(user);
},
});
Use a val town token as the username, and keep the password blank to authenticate.