I use nodeJs to render html, but html is wrapped in pre tags.

I use nodeJs to render html, but html is wrapped in pre tags

the figure is as follows:

The code of the

section:

var express = require("express");
var router = express.Router();
var path = require("path");
var bodyParser = require("body-parser")

var app = express();

// view engine setup
app.set("views", path.join(__dirname, "public"));
app.set("view engine", "html");

//post
app.use(express.static(path.join(__dirname, "public")));

router.get("/", function(req, res, next) {
  res.render("index");
})


Aug.02,2021

found the problem. I wrote res.header ("Content-Type", "application/json;charset=utf-8") in a cross-domain code;

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e7e1ea-9ad.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e7e1ea-9ad.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?