mirror of
https://github.com/Myxelium/RandomMemerBot.git
synced 2026-04-13 10:30:36 +00:00
Add authentication endpoints & refactor
This commit is contained in:
23
client/router.ts
Normal file
23
client/router.ts
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user