Add authentication endpoints & refactor

This commit is contained in:
Myx
2024-05-12 14:36:10 +02:00
parent 35de8b294d
commit 99b1ee39df
10 changed files with 280 additions and 130 deletions

23
client/router.ts Normal file
View File

@@ -0,0 +1,23 @@
import express from 'express';
import bodyParser from 'body-parser';
import { startServer } from './server';
const app = express();
app.use(bodyParser.json());
// Import routes
import indexRoutes from './controllers/index';
import uploadRoutes from './controllers/upload';
import soundsRoutes from './controllers/sounds';
import authRoutes from './controllers/authentication';
// Use routes
export function runServer() {
app.use('/', indexRoutes);
app.use('/', uploadRoutes);
app.use('/', soundsRoutes);
app.use('/', authRoutes);
app.listen(3040);
startServer(app);
}