Routes in the Nile-JS SDK
@niledatabase/react
.
nile.paths
. For reference, here are the paths for the default routes:
@niledatabase/server/express
package, the routes are exposed in the app
object and
while you may have a frontend that uses @niledatabase/react
to call these routes from the application UI,
you may want to also use them as a REST API for another backend or external service.
In this case, you need to use the routes directly. The key is to:
\auth\google\callback
with
custom logic. We are using handlersWithContext
to get the nile
object in the route handler.
handlersWithContext
returns a tuple with the nile
object, configured based on the response from the route handler,
and the response from the route handler.