#Connecting to mongoose with Astro.

3 messages · Page 1 of 1 (latest)

craggy mantle
#

Hello, I have been attempting to connect to mongodb database through Astro so that I can use Mongoose with astro. However I cannot seem to find any good method for doing so. I would be blessed if someone offered to assist me in this endeavour. Thank you very much everyone. Have a very good day.

spring nimbus
#

Hey, you can use Prisma with output: 'hybrid' to make Server Routes that would be rendered on-demand. That means you would get Node js bundle instead of static pages and be able to use it to have a database running. Or you could setup a separate backend and use Prisma there while talking to it with fetch https://docs.astro.build/en/guides/endpoints/#server-endpoints-api-routes

Docs

Learn how to create endpoints that serve any kind of data

craggy mantle