ផ្លូវមានប៉ារ៉ាម៉ែត (route parameter) គឺជាបណ្តា URL ទាំងឡាយណាដែលផ្នែករបស់វាមួយចំនួនអាចត្រូវប្រែប្រួលទៅតាមកាលទេស។ ពិនិត្យកម្មវិធីខាងក្រោមនេះ៖
import express from 'express'
import path from 'path'
const app = express()
const port = process.env.PORT || 3000
const __dirname = path.resolve()
import index from './routes/index.js'
import backend from './routes/backend.js'
app.set('views', path.join(__dirname, 'views'))
app.set('view engine', 'ejs')
app.use(express.static(path.join(__dirname, 'public')))
app.use('/',index)
app.use('/backend',backend)
app.listen(port,function(){
console.log(`This application is listening to the port: ${port}`)
})
/* ./routes/backend.js */
import express from 'express'
const backend = express.Router()
/* GET backend page. */
backend.get('/:page', function(req, res, next) {
const data = req.params
res.render('backend',data)
})
export default backend
<!--views/backend.ejs-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Express.js Web Framework</title>
<link href="/fonts/setup.css" rel="stylesheet">
<link href="/styles/base.css" rel="stylesheet">
</head>
<body>
<p><%= page %></p>
</body>
</html>