const session = require("koa-session")
const redis = require("koa-redis")
how do you write your configuration? Can you post the code?
const session = require("koa-session")
const redis = require("koa-redis")
how do you write your configuration? Can you post the code?
github, https://github.com/koajs/koa-...
is it necessary for RT: to do this? if you don t think this is necessary, how can koa-router standardize the interface path and html path? ...
const session = require( koa-session ); const Koa = require( koa ); const app = new Koa(); app.keys = [ some secret hurr ]; const CONFIG = { key: koa:sess , ** (string) cookie key (default is koa:sess) * ** (number || session ) maxAge...
here I want to use the latest asynchronous way of es6 to achieve, ask for your advice! As I wrote below, I can upload pictures, but I just can t return the body data. So the result is that the picture has actually been uploaded, but the interface shows...
const router = require( koa-router )(); const fs = require( fs ); router.post( upload , async (ctx){ const file = ctx.request.body.files.file; const reader = fs.createReadStream(file.path); const ext = file.name.split( ...
Abstract a Mongodb instance module in koa2. mongoUtil.js const MongoClient = require( mongodb ).MongoClient; async function getMongoDB() { try { const client = await new MongoClient( mongodb: localhost:27017 test ).connect(); db = cl...