Questions tagged [koa]

0 votes
0 replies
I get undefined ctx.request.files when uploading image with React
I'm trying to upload some images from React to Koa server and store them on specific folder. I tried to do so by putting images on React's local...
asked 4 months ago
0 votes
0 replies
How to loop in MySQL stored procedure when making a nodeJS query call
I am building a scheduler app that allows me to add appointments to a calendar. How ever, I run into a problem where my stored procedure never lo...
asked 4 months ago
0 votes
1 replies
Application Insights can't track request in node middleware
I am using Strapi (which is built on top of Koa) for my CMS. I have added a middleware which is triggered on every request to the server. This mi...
0 votes
0 replies
Koa middleware .use is not getting triggered when using it on a route
I am still starting out with Koa, and I have this route: export default new Router<ApplicationState, ApplicationContext>() .get('/', (ct...
koa
asked 4 months ago
0 votes
1 replies
How to pass a parameter in Koa middleware with context?
I am using nodejs koa rest api service. And I want to pass a parameter to validation middleware. But I also need to pass context. How can I co...
asked 5 months ago
0 votes
0 replies
Implementing Socket.io real time Chat in my React Web App with Koa/typeorm/postgresSQL DB
sorry for the not so descriptive question, but basically my case is as follows: I have a web app to rent rooms, it has a user-to-user chat, so y...
asked 5 months ago
0 votes
0 replies
How do I get my nodejs app deployment to load next build resources (404 console error strips my website of all react components)
Straight up, the same code deployed two different ways: npm run dev on my localhost https://02e7822e.ngrok.io npm start (I assume) on Google Ap...
asked 6 months ago
0 votes
3 replies
Trying to use koa bodyparser and ctx.body undefined
I'm trying to learn koa and can't figure out why i'm getting the error: server error TypeError: ctx.body is not a function at getHandler (/U...
asked 5 months ago
0 votes
1 replies
How I can send react app from server koajs
I have react App. I have bundle.js and index.html with scipts and root element. But I don't know, how I can send it from server. I have server k...
asked 6 months ago
1 votes
0 replies
Pass parameters to node.js domain.on('error'…)
I use koa, domain and koa-respond. I use domain because request sometime crashes and I want to not crash node.js. My question is, is it possible...
asked 6 months ago
0 votes
0 replies
React router and static server Koa js
I use koajs like static sever app.use(cors()); app.use(koaBody()); app .use(router.routes()) .use(router.allowedMethods()) .use(serv...
asked 6 months ago
0 votes
1 replies
Why bodyParser returns undefined?
I can't get body of request for the POST http://127.0.0.1:3001/users?name=Slava. Server responce 'name is required'. Method getUsers work corre...
asked 5 months ago
0 votes
0 replies
when does koa write the http header to the socket?
everything is in the question, I want to know when does koa2 exactly write the headers to the socket ? for example in nodejs I know when I call w...
asked 6 months ago
0 votes
1 replies
Koa Server-sent Events yields only errors to EventSource in browser
I've got a Koa Node server which I'm trying to send server-sent events from. However I'm only seeing the EventSource.onerror callback being invok...
0 votes
1 replies
Why can't I serve static files from a Koa router?
Why in the following case does koa-static fail to work with koa-router? const Koa = require("koa") const serve = require("koa-static") const Rou...
0 votes
0 replies
koa2-swagger-ui Authentication
I'm using JWT for a Koa based application, and I'm using koa2-swagger-ui for some api documentation. Some routes are protected, and the user must...
asked 8 months ago
0 votes
1 replies
404s for every Koa route (Typescript)
Problem Setting up Auth Controllers Using Bcrypt and JWT All POST Calls to Koa 404ing Calls to other routes working fine Possibly a issue wi...
0 votes
1 replies
How to set and use cookies right away in the same request to the koa server?
I can successfully set cookies on the koa server. Is there a way to use these cookies in the same request? I am fine to issue a second request wi...
asked 8 months ago
0 votes
1 replies
Cannot store data in koa.js app using koa-session
I'm using koa-session in my koa-app to store some data. So here is my code: /*some code*/ app.use(session(app)); /*some code*/ router.get('/test...
asked 7 months ago
0 votes
0 replies
React and Koa in Production
I cannot serve React build on my Koa server, Im using also routing-controllers as my Backend. I have tried using koa-send to serve up the react...
asked 8 months ago
0 votes
1 replies
How to deploy a Koa based TypeScript project into both AWS Lambda and Azure Cloud Function?
I got a web application which developed using Koa.JS. I want to deploy to both Azure Cloud Function and AWS Lambda. so I don't need to maintenanc...
1 votes
1 replies
Typescript: Mapped array to sequential function in/output
In Typescript, is there a way to express an array with the following property? [ [0]: function(in: A): B; [1]: function(in: B): C; [2]: fu...
asked 8 months ago
2 votes
1 replies
How to fix “Choose either to return a promise or call 'done'” in Azure Functions with Koa
I'm trying to get koa working with azure functions. The "hello world" app is is already working via koa but while running the dev server azure is...
asked 7 months ago
1 votes
0 replies
Why socket.io makes server's CPU 100%? Nuxt+koaJS
I have problem with SocketIO + NuxtJS. In Production Mode, sometimes server's CPU Usage is suddenly 100% since I attatch socketIO server. Please...
asked 6 months ago
0 votes
1 replies
Add koa plugin to eggjs framework
I would like to add koa-validate to eggjs. Code from koa-validate readme: var koa = require('koa'); var app = koa(); var router = require('koa-...
asked 8 months ago