I am trying to deploy react and nodejs app on GoDaddy hosting but its just showing nodejs output,
I am serving my build folder like this
if (process.env.NODE_ENV === "production") {
app.use(express.static(path.join(__dirname, 'build')));
app.get("/*", (req, res) => {
res.sendFile(path.join(__dirname, 'build', 'index.html'));
});
}
still react app isn't showing up
i had the same problem with this.
i just removed the if condition and its started working fine because the if condition process.env.NODE_ENV
doesnt work here..:)