When I run git push heroku master
, I get this error:
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/exampleapp-54011.git'
All the files I want to push are in the public folder, this is my app.js
:
const express = require("express");
const path = require("path");
const PORT = process.env.PORT || 3000;
const app = express();
app.use(express.static(path.join(__dirname, "public")));
app.listen( PORT, ()=> console.log(`server started at port ${PORT}`) );