How to render pictures with express of node

<!doctype html>
<html lang="en">
<head>
    <title>Document</title>
</head>
<body>
    

<%= helloWorld %>

<img src="./a.jpg" alt="" /> </body> </html>
var express = require("express");
var app = express();
// ./views
// app.set("views", path.join("views"));
app.engine("html", require("ejs").renderFile);
app.set("view engine", "html");

/*app.get("/!*", function(req, res, next) {
    console.log(req);
    var referer = req.headers.referer;
    console.log(referer);
    if(referer.indexOf("localhost")===0){
        // res.send("");
        return;
    }else{
        next();  //,next ,
    }
});*/
app.get("/", function(req, res) {
    res.render("index", { helloWorld: "hello,world" });
});
app.listen(3000, function() {
    console.log("app listen at 3000");
});

clipboard.png

Why can"t the picture be rendered, showing 404

Mar.02,2021

there are no pictures processed in your route, so 404, find a plug-in for static resources


express static

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-1b36442-2bff7.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-1b36442-2bff7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?