Browse Source

pisah domain

master
jefry 4 years ago
parent
commit
af8430d562
2 changed files with 5 additions and 2 deletions
  1. +0
    -0
      pages/_(index).js
  2. +5
    -2
      server.js

pages/index.js → pages/_(index).js View File


+ 5
- 2
server.js View File

@@ -14,9 +14,12 @@ app.prepare().then(() => {
const parsedUrl = parse(req.url, true); const parsedUrl = parse(req.url, true);
const { pathname, query } = parsedUrl; const { pathname, query } = parsedUrl;
if (pathname === "/") { if (pathname === "/") {
app.render(req, res, "/home", query);
app.render(req, res, "/yamaha/home", query);
} else if (pathname === "/yamaha") {
app.render(req, res, "/yamaha/home", query);
} else if (pathname === "/suzuki") {
app.render(req, res, "/suzuki/home", query);
} }
// else if (pathname === "/bookingservice/") {
// app.render(req, res, "/BookingService", query); // app.render(req, res, "/BookingService", query);
// } else if (pathname === "/statuspengajuan/") { // } else if (pathname === "/statuspengajuan/") {
// app.render(req, res, "/StatusPengajuan", query); // app.render(req, res, "/StatusPengajuan", query);


Loading…
Cancel
Save