"use strict"
const express = require("express")
const router = express.Router()
require("dotenv").config()
const current_file_version = process.env.CURRENT_APP_VERSION + ".js"
const site_pages_controller = "../controllers/app/site_pages/"
const homeRouter = require(site_pages_controller + "home/" + current_file_version)
router.use("/", homeRouter)
const users_controller = "../controllers/app/users/"
const profileRouter = require(users_controller + "profile/" + current_file_version)
router.use("/profile", profileRouter)
module.exports = router
Both of these urls are fetching code from site_pages/v1.js .. If I comment that, then both of the urls point to the /profile/v1.js
I tried commenting the codes in the controllers. Both urls point to the same GET every time. If I comment the route itself, then it works correctly. Please help.
New contributor
iam preethi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.