My website on glitch stuck on starting (sometimes is not loading at all and i see a blank page)

this is my project.
my project using (json server package) as database (my db file is db.json).
I want to bring my project online so that my database will also run and work properly.
but when i want to see my project preview in glitch website , i see a blank page or stuck in starting.
what can i do for that?

Hi @Am1rreza - your npm start script just says “db.json” which is not a file that would tell the container how to run your app. You’ll need some server side code to point to - you can see an example in our minimal node starter: Glitch :・゚✧

In the package.json there, the run script is “node server.js” and the server.js file initiates the app and contains the endpoints need to get and post to the index page.

Does this work for my project too?
can i copy server.js file or not?

I copied this file and changed start script and tried again but it didn’t work

I don’t know which part of this file I should change according to my codes

this is my json server link : http://localhost:3000/items

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.