src/controllers/express/index.js   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 21
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 15
mnd 0
bc 0
fnc 1
dl 0
loc 21
rs 10
bpm 0
cpm 1
noi 1
c 0
b 0
f 0
1
import express from 'express';
2
import { app as appConfig } from 'src/config.js';
3
import middlewares from './middlewares';
4
import router from './router';
5
6
const { prefix, port } = appConfig;
7
const app = express();
8
9
app.disable('x-powered-by');
10
11
app.use(middlewares.json);
12
app.use(middlewares.urlencoded);
13
app.use(middlewares.cors);
14
app.use(middlewares.arrays);
15
app.use(prefix, router);
16
17
app.listen(port, () => {
18
    console.log(`APP STARTING AT ${port}`);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
19
});
20
21
export default app;
22