I have zero experience with mongodb and swr and I tried following every step in this article but I kept getting 404 errors, both in the browser and in postman.
You may have done other steps that you forgot to include here?
I even cloned the repo from your github and ran npm install to install the dependencies and ran npm run dev which resulted in 500 errors, both in the browser and in postman. Here are a few screenshots:
Have you tried starting from zero and just following the steps in this article?
Also can you please add a little bit of explanation for this line?
letdb=client.db("truskin-storage");// free version
I started the demo of SWR from scratch. Currently, the database I used has expired due to inactivity, but you can generate your API key and set a .env file. You can generate it by creating a new cluster in MongoDB Atlas.
let db = client.db("truskin-storage");
The string "truskin-storage" is the DB kind of alias name generated by Mongo during the creation of the database itself.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi,
I have zero experience with mongodb and swr and I tried following every step in this article but I kept getting 404 errors, both in the browser and in postman.
You may have done other steps that you forgot to include here?
I even cloned the repo from your github and ran
npm install
to install the dependencies and rannpm run dev
which resulted in 500 errors, both in the browser and in postman. Here are a few screenshots:Have you tried starting from zero and just following the steps in this article?
Also can you please add a little bit of explanation for this line?
I started the demo of SWR from scratch. Currently, the database I used has expired due to inactivity, but you can generate your API key and set a .env file. You can generate it by creating a new cluster in MongoDB Atlas.
let db = client.db("truskin-storage");
The string "truskin-storage" is the DB kind of alias name generated by Mongo during the creation of the database itself.