Answer the question
In order to leave comments, you need to log in
Doesn't open pug?
Good afternoon. I decided to use the pug template engine when creating the application, and at the very beginning an error occurred. Before that, I used handlebars and there were no problems.
An error pops up
const express = require('express')
const path = require('path')
const fs = require('fs')
const pug = require('pug')
const app = express()
app.set('view engine', 'pug')
app.use(express.static(path.join(__dirname, 'public')))
app.listen(3000, ()=>{
console.log('Node express work on 3000')
})
app.get('/', (req, res) => {
res.render('main.pug')
})
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