Answer the question
In order to leave comments, you need to log in
I am writing a website in Express and Handlebars. Why are the styles not included?
Hello. I make a list of posts with a link in each "Open post". I open a post, the page is loaded, but the styles are not connected. That is, all data is displayed by id, but styles are not connected ...
const {Router} = require('express')
const Publication = require('../models/publication')
const router = Router()
router.get('/', async (req, res) => {
const publications = await Publication.getAll()
res.render('blog', {
title: 'Блог',
isBlog: true,
publications
})
})
router.get('/:id', async (req, res) => {
const publication = await Publication.getById(req.params.id)
res.render('publication', {
title: 'Пост',
isBlog: true,
publication
})
})
module.exports = router
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