mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 19:10:12 +08:00
feat: add usercount, session count and complete rate
This commit is contained in:
1 parent
add6bfd100
commit
cc95bb195b
7 files changed
+131
-5
No files matched your search
@@ -2,6 +2,7 @@ import connectDB from '@linux-odyssey/models'
|
||||
import express from 'express'
|
||||
import { engine } from 'express-handlebars'
|
||||
import config from './config.js'
|
||||
import { homeController } from './controllers/index.js'
|
||||
|
||||
async function main() {
|
||||
await connectDB(config.db)
|
||||
@@ -12,9 +13,7 @@ async function main() {
|
||||
app.set('view engine', 'handlebars')
|
||||
app.set('views', './views')
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.render('home', { title: 'Linux Odyssey Admin' })
|
||||
})
|
||||
app.get('/', homeController)
|
||||
|
||||
app.listen(3001, () => {
|
||||
console.log('Server started on http://localhost:3001')
|
||||
|
||||
Reference in new issue
Block a user