Sign Up

Talk Programming , Career, Mental Health, Talk Personal Finance ❤️‍ Post a query and receive responses ✅

Have an account? Sign In


Have an account? Sign In Now

Sign In

Post a query and receive responses. Ask anything, Ask Mitra ❤️‍

Sign Up Here


Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.


Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.


Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Ask Mitra

Ask Mitra Logo Ask Mitra Logo

Ask Mitra Navigation

  • Home
  • About Us
  • Find Jobs
  • Blogs
    • Add New Blog !
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Ask a Question
  • Home
  • All Categories
  • Find Jobs
  • Points and Swags
    • Badges and Points
    • Ask Mitra Swags
  • Blog
    • Add New Blog !
  • FAQs
  • Community Members 💓
  • About Us
  • Contact Us
Home| Questions|Q 85706
Next
In Process
RomanGurng
RomanGurng
Asked: December 8, 20222022-12-08T21:50:20+05:45 2022-12-08T21:50:20+05:45In: —technical books

ABOUT PUG Template PROBLEM in BACKEND

[Guys my pug file,style.css file  and backend app.js file is working fine and even DOM is loading on local host but image isnot displaying on my website.Even I have written a correct path under a img tag under a pug file. HELPME GUYS.]

 

{{{This is my simple basic backend file.Is there any problemhere in my below file?}}}

//app.js file
const express=require(“express”);
const path=require(“path”);
const fs=require(‘fs’);
const app=express();
const port=8000;
app.use(‘/static’,express.static(‘static’));
// For serving static files
app.use(express.urlencoded()); // we are using html form in backed so use this code.
// It helps you to take the formdata into the express
// /static is a url and ‘static’ is a folder
app.use(‘/s’,express.static(‘PROJECT_BACKEND’));
// set the template engine as pug
// PUG SPECIFIC STUFF
app.set(‘view engine’,’pug’) //set the template engine as pug
app.set(‘views’,path.join(__dirname,’views’))// Set the views directory
// Our pug demo endpoint
app.get(‘/’, (req, res) => {
   res.status(200).render(‘git.pug’);
});
app.post(‘/’,(req,res)=>{
    res.status(200).render(‘git.pug’);
});
// START THE SERVER
     app.listen(port,()=>{
    console.log(`The application started successfully on port ${port}`)
    })
// START THE SERVER
     app.listen(port,()=>{
    console.log(`The application started successfully on port ${port}`)
    })

//git.pug file

doctype html
head
  meta(charset=’UTF-8′)
  meta(http-equiv=’X-UA-Compatible’ content=’IE=edge’)
  meta(name=’viewport’ content=’width=, initial-scale=1.0′)
  title The Github Blog:Security News and ….
    //- link(rel=’stylesheet’ href=’../style.css’)
  style
    include ../style.css
  script(src=’https://kit.fontawesome.com/38aa091195.js’ crossorigin=’anonymous’)
nav#navbar
  ul#ul
    i#meow.fa.fa-github
    // <img id=”nav-img” src=”meow.png” alt=””>
    img#slash(src=’../img/slash.png’ alt=”)
    // <i id=”slashfav”class=”fas fa-slash”></i>
    span Blog
    li
      a.nav-link(href=”) Engineering
    li
      a.nav-link(href=”) Product
    li
      a.nav-link(href=”) Security
    li
      a.nav-link(href=”) Open Source
    li
      a.nav-link(href=’https://github.blog/category/enterprise/&#8217;) Enterprise
    li
      a.nav-link(href=”) Changelog
    li
      a.nav-link(href=”) More
      // <img id=”down” src=”down-arrow.png” alt=””>
      i#nav-down.fa.fa-angle-down
    li
      a#Free-trial(href=”) Free trial
    li
      a#contact-sales(href=”) Contact sales
    li
      i.fa.fa-search
      // <li><img id=”search” src=”search.png” alt=””></li>
  // This is a TEST By ME…
footer
  .category category
  .security
    h1 Security
section#section
  .contain-1
    .mitigate
      a(href=”) How to mitigate OWASP vulnerabilities while staying in the flow
    .mitigate-down
      p
        | Explore how GitHub Advanced Security can help address several of the OWASP Top 10 vulnerabilities
      img#mark(src=’../img/Mark.png’ alt=”)
      span
        a#span-paul(href=”)  Mark Paulsen
      .aside
        | November 4, 2022
  .contain-2
    img#bee(src=’img/bee.PNG’ alt=”)
.clear
header
  .row-1
    img#row-1(src=’img/row-1.PNG’ alt=”)
    a.row-link(href=”)
      | How GitHub converts previously encrypted and unencrypted columns to ActiveRecord
      | encrypted columns
    p.des
      | This post is the second part in a series about ActiveRecord::Encryption that shows how GitHub
      | upgrades previously encrypted and unencrypted columns to ActiveRecord::Encryption.
    a.below-link(href=”) kylie Stradley
    p.below-des.firstnov November &nbsp;3,&nbsp; 2022
    // CLEAR
    .clear
  .row-2
    img#row-2(src=’../img/row-2.PNG’ alt=”)
    a.row-link(href=”) Creating a more inclusive security research field
    p.des.row
      | A glimpse into the backgrounds and day-to-day work of several GitHub employees in cybersecurity
      | roles.
    a.below-link(href=”) Hauwa Otori
    p.below-des
      | October &nbsp;31, &nbsp;2022
    .clear
  .row-3
    img#row-3(src=’../img/row-3.PNG’ alt=”)
    a.row-link.cyber-link(href=”) Cybersecurity spotlight on bug bounty researcher @ahacker1
    p.des.wrap
      | As we wrap up Cybersecurity Awareness Month, the GitHub bug bounty team is excited to
      | spotlight one of the security researchers who participates in the GitHub Security Bug Bounty Program.
    a.below-link.logan(href=”) Logan MacLaren
    p.below-des.october October &nbsp; 28, &nbsp; 2022
    .clear
  .row-4
    img#row-4(src=’../img/row-4.PNG’ alt=”)
    a.row-link(href=”) What we learned from the Security Lab&rsquo;s Community Office Hours
    p.des.four
      | The GitHub Security Lab provided office hours for open source projects looking to improve
      | their security posture and reduce the risk of breach. Here&rsquo;s what we learned and how you can also participate.
    a.below-link.joseph(href=”) Joseph Katsioloudes
    p.below-des.for-october October &nbsp;27, &nbsp; 2022
    .clear
  .row-5
    img#row-5(src=’../img/row-5.PNG’ alt=”)
    a.row-link.encrypts(href=”)
      | Why and how GitHub encrypts sensitive database columns using
      | ActiveRecord::Encryption
    p.des.five
      | You may know that GitHub encrypts your source code at rest, but you may not have known that we
      | encrypt sensitive database columns as well. Read about our column encryption strategy and our decision to adopt
      | the Rails column encryption standard.
    a.below-link(href=”) Kylie Stradley
    p.below-des.five-october October &nbsp;26, &nbsp;2022
    .clear
  .row-6
    img#row-6(src=’../img/row-6.PNG’ alt=”)
    a.row-link(href=”) Why we&rsquo;re excited about the Sigstore general availability
    p.des.six
      | The Sigstore GA means you can protect your software supply chain today with GitHub Actions, and
      | will power new npm security capabilities in the near future.
    a.below-link.Zachary(href=”) Zachary Steindler
    p.below-des.six-october October &nbsp;25, &nbsp;2022
    .clear
  .row-7
  .row-8
  .row-9
#number
  ul
    li#one 1
    li
      a#two(href=”) 2
    li
      img#dotpng(src=’../img/dot…png’ alt=”)
    li
      a#twelve(href=”) 12
    span
      a#Nextss(href=”) Next
      img#arrow(src=’../img/arrow.png’ alt=”)
    // <li><img id=”arrow”src=”arrow.png” alt=””></li>
.subscribe
  .subscribe-container
    h1 Subscribe to The GitHub Insider
    p
      | A newsletter for developers covering techniques, technical guides, and the latest product innovations coming from GitHub.
      input#inputsubs(type=’text’ name=” placeholder=’Your email address’)
    img#photosubscribe(src=’../img/subscribe.png’ alt=”)
    img#photoarrow(src=’../img/subs-arrow.png’ alt=”)
    // <img id=”photo-hover” src=”hover-arrow.png” alt=””>
    // <img id=”border-1″src=”border-1.png” alt=””>
    // <img id=”border-2″src=”border-2.png” alt=””>
    // <img id=”border-3″src=”border-3.png” alt=””>
    // <img id=border-4″ src=”border-4.png” alt=””>
.belownav
  .end1
    h1 GitHub
  .end2
    .sec
      ul
        li Product
        li
          a(href=”) Features
        li
          a(href=”) Security
        li
          a(href=”) Enterprise
        li
          a(href=”) Customer Stories
        li
          a(href=”) Pricing
        li
          a(href=”) Resources
    .sec
      ul
        li  Platform
        li
          a(href=”) Developer API
        li
          a(href=”) Partners
        li
          a(href=”) Atom
        li
          a(href=”) Electron
        li
          a(href=”) GitHub Desktop
    .sec
      ul
        li Support
        li
          a(href=”) Docs
        li
          a(href=”) Community Forum
        li
          a(href=”) Training
        li
          a(href=”) Status
        li
          a(href=”) Contact
    .sec
      ul
        li Company
        li
          a(href=”) About
        li
          a(href=”) Blog
        li
          a(href=”) Careers
        li
          a(href=”) Press
        li
          a(href=”) Shop
footer.theend
  ul.leftend
    li &copy; 2022 GitHub, Inc.
    li
      a(href=”) Terms
    li
      a(href=”) Privacy
  ul.rightend
    a(href=”)
      img(src=’../img/tweeter.png’ alt=”)
    img#facebook(src=’../img/facebbok.png’ alt=”)
    img#youtubeapp(src=’../img/youtube.png’ alt=”)
    img#chatapp(src=’../img/chatapp.png’ alt=”)
    img#tittok(src=’../img/tittok.png’ alt=”)
    img#linkedin(src=’../img/in.png’ alt=”)
    img#github(src=’../img/github.png’ alt=”)
  .clear
NOTE:YOU CAN TAKEMINE CODE AND SEE THE PROBLEMS BROTHER AND SISTER and if anybody has a soluion then please kindly helpme guys…..
  • 0
  • 1 1 Answer
  • 39 Views
  • 0 Followers
  • 0
Share
  • Facebook

    Related Questions

    • How can we build long-term, mutually beneficial relationships with our customers?
    • Question
    • Reverse engineering
    • What is hcard??
    • we devlopment pug Inheritance error in a child classs

    You must login to add an answer.


    Forgot Password?

    Need An Account, Sign Up Here

    1 Answer

    • Voted
    • Oldest
    • Recent
    • Random
    1. BidhanN
      2022-12-25T17:35:26+05:45Added an answer on December 25, 2022 at 5:35 pm

      app.use(express.static(‘public’));

      //try this and put all images folders in public folder

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    Sidebar

    Ask A Question

    Your Favourite Topics

    • Announcements
    • Blockchain
    • Books

        • —Non Tech Books
        • —technical books
    • Business and Entrepreneurship
    • Careers
    • College
    • Content and Blog
    • CyberSecurity
    • Design and Arts
    • Devices and Gadgets
    • Digital Marketing
    • Entertainment

        • —Movies-Series-TV
        • —Music
        • —Sports
    • Events
    • For Admins only.
    • Health

        • —Fitness
    • Money

        • —Personal Finance
        • —Stock Market
    • Operating System

        • —linux
        • —windows
    • Other
    • Paid Internship
    • Programming

        • —AI/ML
        • —APIs
        • —C & C#
        • —Django
        • —Flutter
        • —Go
        • —HTML&CSS
        • —Java
        • —JavaScript
        • —Mobile Apps Development
        • —Node Js
        • —NoSQL
        • —Php
        • —Python
        • —React JS
        • —SQL

    Stats

    • Questions 1k
    • Answers 10k
    • Best Answers 391
    • Users 2k

    Top 6 Members This Month

    Vicky

    Vicky

    • 0 Questions
    • 78 Points
    Sensei
    puppet

    puppet

    • 0 Questions
    • 23 Points
    Beginner
    wtfixair

    wtfixair

    • 0 Questions
    • 22 Points
    Beginner
    Dhanmaya

    Dhanmaya

    • 0 Questions
    • 20 Points
    Beginner
    Riyesh

    Riyesh

    • 0 Questions
    • 20 Points
    Beginner
    pranitkarki

    pranitkarki

    • 0 Questions
    • 20 Points
    Beginner

    Trending Tags

    askmitra blockchain c++ career coding College cybersecurity Django Flutter help javascript laptop laravel linux poll Programming python question react web web development wordpress
    • Popular
    • Answers
    • Rounak Agrawal

      Ask Mitra Udemy Courses Giveaway

      • 76 Answers
    • Subedi Bibek

      The Complete JavaScript Course 2022: From Zero to Expert! Udemy ...

      • 73 Answers
    • Subedi Bibek

      Mega Giveaway at askmitra.com 🔥

      • 69 Answers
    • bishwaKiran
      bishwaKiran added an answer Try getting into githubs student program, use your university/collage/school ID… January 30, 2023 at 7:44 pm
    • Sandeep Poudel
      Sandeep Poudel added an answer SOLVED: It was due to unfinished SSL certificate installation January 27, 2023 at 7:11 pm
    • Aashutosh_k
      Aashutosh_k added an answer Software piracy protection system Fingerprint voting system Stock price prediction… January 26, 2023 at 7:37 pm

    Related Questions

    • How can we build long-term, mutually beneficial relationships with our ...

      • 2 Answers
    • Question

      • 1 Answer
    • Reverse engineering

      • 6 Answers
    • What is hcard??

      • 4 Answers
    • we devlopment pug Inheritance error in a child classs

      • 3 Answers

    Explore

    • Home
    • Trending Category
      • Programming
      • Web Development
      • —Mobile Apps Development
      • —Stock Market
      • Business and Entrepreneurship
      • Blockchain
      • College
      • —Personal Finance
      • —HTML&CSS
      • —JavaScript
      • —Python
      • —React JS
      • —Node Js
      • —C & C#
      • Content and Blog
      • Careers
    • All Categories
      • Go to All Categories
      • Health
      • —Go
      • —Flutter
      • Digital Marketing
      • —APIs
      • Devices and Gadgets
    • Find Job and Internships
    • Points and Swags
      • Badges and Points
      • Ask Mitra Swags
    • All Blogs
      • Add New Blog !
    • FAQs
    • Community Members 💓
    • Questions
      • Un Answered
      • New Questions
      • Most Seen Questions
      • Most Answered
      • Trending Questions
    • Tags

    Footer

    Ask Mitra

    Ask Mitra

    Ask Mitra is a social question and answer engine that will assist you in forming a community and connecting with others. Talk about programming, your career, your mental health, and your personal finances. ❤️‍ Post a query and receive responses ✅

    Quick Navigation

    • Ask a Question
    • Home
    • All Categories
    • Find Jobs
    • Points and Swags
      • Badges and Points
      • Ask Mitra Swags
    • Blog
      • Add New Blog !
    • FAQs
    • Community Members 💓
    • About Us
    • Contact Us

    Legal Stuff

    • Terms of use and policy