Node.js + html help request

I’m using glitch website preset and was wondering how I can get it so that I can use node.js on it as well as other requires()

it should switch mode when you create a package.json file

just added and now it’s loading forever saying starting… maybe this broke my website

oh I should clarify, adding that tells glitch to run the project as a node.js app, but it doesn’t convert your existing static site. you’ll still have to write the server code etc. and in that server code you’ll be free to use require.

you can delete that package.json file to switch back if that’s not what you wanted

I just removed it

was just hoping to run node.js in my site

meaning what, from the terminal?

what? I need it for a database.

well it sounds like you had been on the right track with adding the package.json file. but you would have to write the actual node.js code to run on your site.

unless you were hoping to run node.js in your site but not to write any node.js code? I don’t have any recommendations if that’s the case

alright at least you responded maybe someone else can help me

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