I am New to node.js and nginx. I created one node.js application using express.js structure. I hosted that applictation in nginx for https. And crated one domain ap.local.in. Now i run project with https://ap.local.in i get first page of views folder.Now i want get https://ap.local.in/event when i run https://ap.local.in/event i got 404 Not found How to get all pages of views folder.Is it possible? Please help me! my nginx.conf file is
server {
listen 80;
listen [::]:80;
server_name ap.local.in;
root /www/html;
location / {
proxy_pass "http://www.ap.local.in:8080";
}
}
This is how i think you code should look like:
var event = require('./routes/eventRoute'); var app = express(); app.set('views', path.join(__dirname,'views')); app.set('view engine', 'jade'); app.use('/event', event)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.