added end states for /record; connected db to frontend of /listen