Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
671 views
in Technique[技术] by (71.8m points)

javascript - Failed to load resource: the server responded with a status of 500 Heroku (Internal Server Error)' in my console of website?? Heroku

I made a website and hosted on Heroku all pages work fine but there is this one page when I click on the About tab it gives me this error Internal server error and I can also see some error saying 'heroku about:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)' in my console of website'

here is the website link:- https://yuvraj-agarkar.herokuapp.com

here is the code for my app.js file

const express = require('express');
const app = express();
const bodyParser = require('body-parser');
app.set('view engine','ejs');
app.use(express.static('public'));
app.use(bodyParser.urlencoded({extended:true}));
let port = process.env.PORT || 3000;
app.get('/',(req,res)=>{
    res.render('home');
});
app.get('/:name',(req,res)=>{
    if(req.params.name === "about"){
        res.render('about');    
    }else{
        res.render('Blogs/'+req.params.name);
    }
    
});
// app.get('/about',(req,res)=>{
//     res.render('About');
// })

app.listen(port,()=>{
    console.log("server started on port 3000");
})

here is the code for my about me file (its an pjs file)

<%-    include('./partials/header')     -%>

<h3 class="about-logo">About</h3>
<div class="aboutme">
    <div class="image">
        <img src="/images/myImage.png" alt="Yuvraj">
    </div>
    
    <p>
        Hi i am Yuvraj . I am Aspiring iOS Developer i like Coding and reading programming related stuff thats what my hobby is.
    </p>
    <p>
        I have made several iOS Apps till now and i am still up in my journey of besides that i like listening to music sometimes. I like to help and learn by sharing because that's the one thing that works for me a lot of times
    </p>
    <p>
        Sometimes i do write blogs and Articles teaching several programming concepts wether its related to Various Design patterns or Using a FrameWork ,Libraries etc.
        Anything that i find interesting i do it and like to talk about it.
    </p>
    <p>
        You can read some of my articles here i will try to post it regulary. I also do Web Development sometimes. You can follow me on <span><a href="https://twitter.com/agarkaryuvraj">Twitter</a></span> because i am mostly active there.
    </p>
</div>

<%-    include('./partials/footer')     -%>

here is a snapshot of my viscose editor so that you can get better look at the file hierarchy

please help me fix this thank you

question from:https://stackoverflow.com/questions/66055980/failed-to-load-resource-the-server-responded-with-a-status-of-500-heroku-inter

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...