/api

This directory holds the endpoints that serve JSON for the /demo, and a few other endpoints that handle POSTS and GETs from the /frontend.

Conventions

As with other directories in /routes, the convention in this directory is that the file in the directory that has same name as the directory handles routing in this directory; i.e., /api/api.ts handles routing that directs a request from /api/cobrowse to the file that does the work: /api/cobrowse.ts.

(If you're wondering why the file that handles routing in this directory isn't an index.ts file... Glad you asked! The reason is that when you have a bunch of files open in your IDE called index.ts, it's impossible to know without clicking in to each file which one is which. Similar issue with debugging server logs.)