I'm trying to deploy a basic node application but whenever I try to deploy it I get an error saying: "Failed to find package.json. Node.js may have issues starting. Verify package.json is valid or place code in a file named server.js or app.js."
I have tried re-creating the zip file and restarting the node file I have tried validating my package.json and it is valid
my app.js is simply:
const server = http.createServer( (req,res) => {
res.writeHead(200, {"Content-Type" : "text/plain"})
res.end("Hello World")
})
server.listen(3000)
console.log("Listening on port 3000")
my package.json file is:
{
"name": "Tutorial",
"version": "1.0.0",
"description": "A simple Hello World",
"main": "app.js",
"author": "kittom",
"license": "ISC"
}
It should allow me to see hello world on port 3000 of the url