Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, I am developing a website by testing the new functions of Cloudflare, and I already have my website integrated in their beta version. However, I would like to finalize the system I want to compose based on:

1. Teleporthq
2. Github Repository
3. Cloudflare Page
4. Cloudflare D1 or MongoDB

I have the first three items on the list for the new site system application, but I have been researching and trying to follow the steps to connect my website to a database, either Cloudflare D1 or MongoDB. I am encountering an error in the deployment due to not having the dependencies of Mongoose or because Cloudflare Workers is not being used correctly. I have been searching for a solution but have not been successful.

What I have tried:

I tried to set up a Cloudflare worker, but the installation information for Cloudflare Workers with d1 or MongoDB is not very clear. I also tried to run it from my GitHub repository, which is already synchronized with MongoDB, but when I deploy it on Cloudflare, it fails because it says Cloudflare does not have dependencies with Mongoose.
Posted

1 solution

Here is the information for Cloudflare D1 · Cloudflare D1 docs[^]. On that page it lists a number of support options. Cloudflare Discord[^] may be a better place to ask.

Also, if you look at the sidebar menu on that page, there are code examples, tutorials, and other information. I would start here: Get started · Cloudflare D1 docs[^].

This looks helpful: Making static sites dynamic with Cloudflare D1[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900