infinity mirror effect
This commit is contained in:
@@ -8,18 +8,21 @@ import forms from 'forms'
|
||||
|
||||
import { initWebSocket } from './ws.js'
|
||||
import util from './util.js'
|
||||
import getAllDownloadsFiles from "./getDownloads.js"
|
||||
|
||||
export default class Server {
|
||||
store;
|
||||
|
||||
registerRoutes(router) {
|
||||
router.get('/downloads', this.getDownloads)
|
||||
router.get('/*', this.get)
|
||||
return router
|
||||
}
|
||||
|
||||
index = async (req, res) => {
|
||||
let filePath = path.join(util.CAVE_PATH, "index.html");
|
||||
res.sendFile(filePath)
|
||||
getDownloads = async (req, res) => {
|
||||
let arr = await getAllDownloadsFiles()
|
||||
console.log(arr)
|
||||
res.json(arr)
|
||||
}
|
||||
|
||||
get = async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user