I started a new Node app and plan to add some code - I replaced the client-side code and then cleared most of the node files. However, now it doesn’t load - it shows starting…
What’s going on? Thanks in advance for helping!
Are you deleting the project file completely?
If so, this is a natural behavior. Glitch has lost something to listen to.
It will work as you add code.
We will need to publish the project to specifically support it.
The server.js file is empty and I removed the start script and express dependency. I haven’t made the project private - what steps do I need to take to make it published?
Screen Shot 2020-03-23 at 8.45.27 PM|690x109
For some reason express is also still installing.
This is most likely part of the current outage.
status.glitch.com
There’s your problem, the server.js file is empty.
So I should put some code in the server.js file?
Hi CarlyRaeJepsenStan,
Glitch projects look for a “start” command in package.json
https://glitch.com/help/failstart/
If you’re interested in building a project without express, you can replace the file name in the start command so for example
"scripts": {
"start": "node yourcode.js"
},
Thanks @mmcewen ! However, the HTML isn’t showing on the window view - I just see “Hello World”. How can I fix this?
EDIT: Actually, nevermind - I had to route the HTML file through express to see it. Thanks for keeping glitch awesome!
Great to hear, yep “show” expects something running on port 3000 and the default hello-express starter uses Express to serve up a HTML file on that port. There are other options out there like Hapi and Koa, hope to create some more starters soon.