Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

212
Views
Jade, express, node.js: Cannot GET /index.html showing in browser

I cant understand why I'm getting this error on my browser when I try to display my index.jade file:

Cannot GET /index.html

My app.js file is a follows:

var express = require('express');

var app = express();
var port = process.env.PORT || 5000;

app.use(express.static('public'));
app.set('views', './src/views');
app.set('view engine', 'jade');

app.get('/', function(req, res) {
    res.render('index');
});


app.get('/books', function(req, res) {
    res.send('Your books are here');
});

app.listen(port, function(Error) {
    console.log('Running server on port ' + port);
});

and my file structure is as follows:

-> app.js
-> public
-> src
   -> views
      -> index.html
      -> index.jade

Any help would be great

Thanks :)

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!