1## Create an API from a [lowdb blob](https://www.val.town/v/pomdtr/lowdb)
2
3This val exports a function that takes a lowdb instance and returns a [Hono](https://hono.dev) router that can be used to interact with the data. This is the beginning of an implementation of something like [json-server](https://github.com/typicode/json-server) for Val Town.
4
5The resulting server also comes with a frontend at `/`. The code for the frontend can be found [here](https://www.val.town/v/nbbaier/dbToAPIFrontend).
3import { Context } from "npm:hono@3.8.1";
4
5export function styleSystem() {
6 function StyleTag() {
7 return (
8 <style
3import { hnLatestPosts } from "https://esm.town/v/stevekrouse/hnLatestPosts";
4
5export async function hnFollowPollJobError({ lastRunAt }: Interval) {
6 try {
7 let posts = await hnLatestPosts({