Answer the question
In order to leave comments, you need to log in
Why is node.js not working on hosting?
Good afternoon!
I'm trying to upload node.js applications to best-hoster's servers. However, when I try to click on the "Fatigue npm packages" button, a 500 error pops up ... I looked at the logs, the error comes from the lines below:
app.set('views', path.join(__dirname, 'views'));
app.engine('hbs', expressHsb({defaultLayout: 'layout',
extname: 'hbs', layoutsDir: __dirname + '/views/layouts/'}))
app.set('view engine', 'hbs');
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(express.static(path.join(__dirname, 'public')));
const indexRouter = require('./routes/index');
const usersRouter = require('./routes/users');
var Cart = require('./routes/cart');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question