express Questions

2

How can I upload an image file (png, jpeg etc.) from React Native using expo to a Node server using Express? I'm a beginner to mobile UI development and the Expo documentation didn't help much. I a...
Reptile asked 12/10 at 5:9

3

I have a problem connecting to the api by axios Error: Request failed with status code 400 Can someone help me please? My services/api.js: ` const axios = require("axios"); const api = axios.cr...
Ecclesiasticus asked 27/2, 2020 at 13:9

2

Solved

I need a NestJS interceptor that archives requests, both in exceptional and happy-path cases. Created as follows: public intercept(context: ExecutionContext, next: CallHandler): Observable<any...
Soapberry asked 8/7, 2019 at 4:46

2

"scripts": { "test": "echo \"Error: no test specified\" && exit 1", "server": "nodemon backend/server.js", "client":...
Crackling asked 29/1, 2021 at 18:28

2

Using express, i have a middleware like this: app.use((req, res, next) => { console.log(req); next(); }); How to wait on this next() to finish pls ? The reason i'm asking is i added console...
Baalman asked 23/9, 2019 at 19:55

15

Solved

I'm learning Node.js and just started working with MongoDB. I'm making a connection with the MongoDB Cluster I've created const dbURI = 'mongodb+srv://testuser:[email protected]/mydb?retryWrit...
Assassinate asked 8/1, 2021 at 4:19

4

Solved

Express.static is working great for any view in root directory, but it breaks when I add a subdirectory. app.use(express.static(path.join(__dirname, 'public'))); Works: //Homepage router.get('/...
Grab asked 4/1, 2016 at 18:2

3

Solved

I'm using Sequelize for a express project I'm working on. In one query I want to retrieve a concatenated result of two columns. Like: SELECT first_name || ' ' || last_name AS full_name FROM table...
Natal asked 15/1, 2017 at 18:14

3

Solved

I have included swagger-ui-express plugin in my node express REST API. While bundling with webpack in production mode, I am receiving as error such as SwaggerUIBundle is not defined. Without webpac...
Antistrophe asked 1/6, 2020 at 16:24

8

Error: No Output Directory named "build" found after the Build completed. You can configure the Output Directory in your Project Settings. i got this error here is my repository https://...
Permenter asked 28/2, 2023 at 13:4

3

Solved

I am new to node.js. I created a file named app.js and put this code in that file using express to switch the template engine: //module dependencies var express = require('express'); routes = re...
Chaudoin asked 10/2, 2015 at 23:0

6

Solved

Always I used to share my node side services to some other teams with proper documentation. Based on this documentation, they will use my services. Regarding this, when I spoke with some other guy...
Marmite asked 13/12, 2015 at 2:50

9

Solved

Have a problem when trying to verify the token (it was working fine before i added some data to it before generating it) .. but now it does not seem to be working ! This is how i generate the token...
Ordonez asked 25/1, 2021 at 10:21

3

Solved

I am testing NodeJS express app that uses csurf package along with express-session package. Problem While testing, i have to make requests that should include csrf token in them but because i don...
Blondellblondelle asked 5/9, 2019 at 20:44

6

Solved

I tried to deploy my express server on vercel to solve cors problem on my front code. The problem is 404 error pops up when I enter the deployed page: but it goes well when I try on localhost. // ...
Volution asked 11/6, 2022 at 13:28

5

I'm just getting started with Node.js, so I'm building very simple applications in order to practice the basics. I was trying to get some Django-like template inheritance working, but I'm at a bit ...
Centistere asked 4/3, 2015 at 19:25

8

TypeError: Cannot read property 'findAll' of undefined (expressjs). All functions (sequelize) are not working. All errors: Cannot read property 'sequelize method' ... module.exports = functio...
Boothman asked 14/1, 2016 at 17:28

5

Take the following POST function in express. (I am using express 3.5.1) app.post('/example', someFunctionOne, someFunctionTwo, function(req, res){ if(!req.someVar){ return res.send(400, { messag...
Neve asked 19/7, 2014 at 12:45

4

I want to add types for my response.locals. It is used to append data to your request-response cycle. What I tried // ./types/express/index.d.ts declare global { declare namespace Express { inter...
Dialytic asked 14/1, 2022 at 15:26

3

Solved

I've the following index.ts: import { User } from "./datatypes" import express from 'express'; console.log("hello world") This is my package.json: { "name": "...
Floppy asked 28/3, 2022 at 7:21

3

Solved

Given a GET request to URL X, how should you define res.send such that it provides a response to a completely separate URL Y? i.e. app.get('/', function (req, res) { res.send to a new URL exter...
Lizzettelizzie asked 8/11, 2016 at 22:29

4

Solved

I want to add routing prefixes at the module level and/or have complex global routing prefix logic in general. I know I can use the undocumented function NestApplication.setGlobalPrefix to set a si...
Keshiakesia asked 16/11, 2020 at 19:52

3

Solved

I'm working on creating a middleware for an express router that will execute some code for every request and response. Intercepting a request is easy and there are plenty of examples, but I have no...
Cychosz asked 5/1, 2017 at 16:5

6

I am getting this error while starting my node js app in my cpanel. RangeError: WebAssembly.instantiate(): Out of memory: wasm memory at internal/deps/cjs-module-lexer/dist/lexer.js:1:33573 but wh...
Schwa asked 31/8, 2021 at 1:0

3

Solved

I want to emit some data to the client when some API route gets called. I have to following code on server.js var app = express(); var http = require('http').Server(app); var io = require('socket...
Dragon asked 1/6, 2016 at 4:43

© 2022 - 2024 — McMap. All rights reserved.