How the “API” application works in zopio
.
api
application runs on port 3002. We recommend deploying it to api.{yourdomain}.com
.zopio
exports the API from the apps/api
directory. It is designed to be run separately from the main app, and is used to run isolate functions that are not part of the main user-facing application e.g. webhooks, cron jobs, etc.
apps/api/app/api-keys
directory. Each controller is a .ts
file that exports a route handler.apps/api/app/webhooks
directory. Each webhook is a .ts
file that exports a route handler.apps/api/app/cron
directory. Each cron job is a .ts
file that exports a route handler.apps/api/app/triggers
directory. Each trigger is a .ts
file that exports a route handler.https://api.{yourdomain}.com/health
.