Closed yrhao closed 7 years ago
In my case, it works. You can provide more information so that others can help.
I'm also seeing this problem.
const Koa = require("koa");
const session = require("koa-session");
const bodyParser = require("koa-bodyparser");
const passport = require("koa-passport");
const logger = require('koa-logger');
const cors = require('kcors');
const routes = require('./routes');
const app = new Koa();
const PORT = process.env.PORT || 3000;
app.use(session(app));
app.use(bodyParser());
app.use(cors({
methods: ['GET', 'PUT', 'POST', 'PATCH', 'DELETE']
}));
app.use(logger());
require("./auth");
app.use(passport.initialize());
routes(app);
app.listen(PORT, () => {
console.log(`Server listening on port: ${PORT}`);
});
module.exports = app;
ctx.request.body ever got empty object {}