Fix assets CORS

This commit is contained in:
Moe Poi ~ 2022-05-13 12:01:00 +07:00
parent 8d7b0d4628
commit 3809342d48

View file

@ -16,7 +16,6 @@ try {
process.exit(0);
}
app.use(express.static("public"));
app.set("view engine", "ejs");
app.use(bodyParser.urlencoded({ extended: true }));
@ -36,6 +35,7 @@ app.use(function (req, res, next) {
next();
});
app.use(express.static("public"));
app.use('/', indexRouter);
app.use('/api', api);