mirror of
https://gitlab.com/nekoya/web.git
synced 2024-11-13 01:46:23 +01:00
Fix placement
This commit is contained in:
parent
20ac25478d
commit
8d7b0d4628
1 changed files with 3 additions and 3 deletions
6
index.js
6
index.js
|
@ -26,9 +26,6 @@ app.use(express.json());
|
|||
app.use(express.urlencoded({ extended: false }));
|
||||
app.use(cookieParser());
|
||||
|
||||
app.use('/', indexRouter);
|
||||
app.use('/api', api);
|
||||
|
||||
app.use(function (req, res, next) {
|
||||
res.header("Access-Control-Allow-Origin", "*");
|
||||
res.header("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, HEAD");
|
||||
|
@ -39,6 +36,9 @@ app.use(function (req, res, next) {
|
|||
next();
|
||||
});
|
||||
|
||||
app.use('/', indexRouter);
|
||||
app.use('/api', api);
|
||||
|
||||
app.listen(config.port, () => {
|
||||
console.log(`Server is running on port : ${config.port}`);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue