// routes/front.js
import express from 'express'
const frontRouter = express.Router()
import indexRouter from './front/index.js'
frontRouter.use('/',indexRouter)
import loginRouter from './front/login.js'
frontRouter.use('/login',loginRouter)
import signupRouter from './front/signup.js'
frontRouter.use('/signup',signupRouter)
export default frontRouter
// routes/front/signup.js
import express from 'express'
const signupRouter = express.Router()
import signup from '../../controllers/front/signup.js'
signupRouter.get('/',async (req,res)=>{
signup.getItem(req,res)
})
export default signupRouter
// controllers/front/signup.js
import config from "../../config.js"
class Signup{
async getItem(req,res){
this.config = await config()
this.config.pageTitle = 'ទំព័រចុះឈ្មោះ'
this.config.route = '/signup'
res.render('base',{data:this.config})
}
}
export default new Signup()