added users and groups
This commit is contained in:
19
src/index.js
Normal file
19
src/index.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import express from 'express';
|
||||
import UserRouter from './routers/user.js';
|
||||
import GroupRouter from './routers/group.js';
|
||||
// import AdminRouter from './routers/admin.js';
|
||||
import log from './utils/log.js'
|
||||
|
||||
import config from '../config.json' with {type: "json"};
|
||||
|
||||
const app = express();
|
||||
|
||||
app.use(express.urlencoded({extended: true}));
|
||||
app.use(express.json());
|
||||
app.use('/api/user/', UserRouter);
|
||||
app.use('/api/group/', GroupRouter);
|
||||
// app.use('/api/admin/', AdminRouter);
|
||||
|
||||
app.listen(config.port, () => {
|
||||
log.info(`Application has started on port ${config.port}`)
|
||||
})
|
||||
Reference in New Issue
Block a user