express Questions

3

I made an review app with Express and Mongoose. I have an review model like below: var mongoose = require('mongoose'); var ReviewSchema = mongoose.Schema({ title: String, description: String, ...
Bottommost asked 25/8, 2018 at 5:56

4

Solved

Here is my server mcve: const express = require("express"); const app = express(); const fs = require("fs"); const dbFile = "./sqlite.db"; const exists = fs.existsSyn...
Rollerskate asked 15/10, 2020 at 13:7

5

Solved

I am trying to upload a file to my server, but req.file and req.files is always undefined on my POST REST endpoint. The content I'm trying to upload is a ".dat" file, and I am expecting a json re...
Macaronic asked 24/2, 2018 at 1:4

5

I'm writing a simple cms in Node.js, Express and MongoDB. I'm planning to run a different Node.js process for every site. The problem is that after startup the process takes about 90m of RAM and fo...
Watkins asked 11/2, 2014 at 6:20

4

Solved

I have a react frontend with domain sambat.io, deployed to Vercel (Zeit) and a Node API deployed to Heroku with this domain https://safe-ridge-68566.herokuapp.com/ and cookie setup like this: res.c...
Coroner asked 6/7, 2020 at 4:56

1

I started using winston, express-winston and winston-mongodb to log both request and responses and add them to the mongodb. After a while I was able to generate the logs while also hiding informati...
Pyro asked 11/10, 2018 at 14:26

4

Solved

I am working on Nodejs/Express app.I used express-generator to create basic structure. For now a specify all routes in the app.js file var indexRouter = require('./routes/index'); var router1Route...
Homophonic asked 10/1, 2020 at 12:44

3

I have been trying for several hours to test an endpoint of my rest api with Jest, Supertest and Express. This endpoint is protected by an authentication middleware named "advancedAuthGuard&qu...
Bushire asked 29/8, 2022 at 0:28

10

Solved

I am trying to code a subscription system with stripe. My following code is mostly copied from the stripe docs, but it always shows me this error: Webhook signature verification failed. Webhook pay...
Kirsch asked 18/5, 2023 at 13:14

4

Solved

I'm trying to set up notifications for an Express app using MongoDB. I have an API endpoint where I $push a user's id to the readBy field in MongoDB to "mark" it as read after retrieving ...
Natividad asked 1/12, 2021 at 22:43

4

Solved

I've been trying to get a express app to send the response as stream. var Readable = require('stream').Readable; var rs = Readable(); app.get('/report', function(req,res) { res.statusCode = 20...
Mckibben asked 5/8, 2016 at 11:58

5

Solved

I'm trying to post from a react client to an express server on localhost and I get this error in google chrome. react app: http://localhost:3000 express app: http://localhost:5000 POST https://lo...
Doorstone asked 5/3, 2020 at 15:22

7

Solved

Somehow my req.body is always empty, maybe you have an idea: here is my server code: const Express = require('express'); const bodyParser = require('body-parser'); const app = new Express(); app...
Douzepers asked 1/7, 2017 at 13:31

1

I noticed that when I have a route and a sub directory of the same name Express / Nodejs will change the URL when visiting that page in the browser. For example, if I have a route named foo and the...
Vedette asked 10/7, 2024 at 14:43

5

Solved

In one of my projects, simply this worked: import cors from "cors"; server.use(cors()); but currently, I am having this lovely typescript warning message in my new project: No overload...
Articulate asked 26/12, 2020 at 20:38

10

We can group our routes like this in Laravel: Route::group("admin", ["middleware" => ["isAdmin"]], function () { Route::get("/", "AdminController@index"); Route::post("/post", ["middleware" ...
Excerpta asked 11/8, 2016 at 10:41

4

Solved

When a pending HTTP request is cancelled by a client/browser it seems that Node with Express continues to process the request. For intensive requests, the CPU is still being kept busy with unnecess...
Lanneret asked 4/2, 2016 at 10:15

3

I am using NodeJs + React in my application. I am using express in NodeJs. I created my sample app using 'create-react-app' npm. I used NodeJs for calling the oauth token from react app. I mentio...
Bisector asked 6/2, 2018 at 3:16

7

Solved

I am trying to create a simple SSR powered project using express + react. To do this, I need to simultaneously watch frontend and backend scripts during development. The goal here is to use express...
Peters asked 13/7, 2022 at 19:33

6

Backend: Express server, with npx create-express-api backend Frontend: Next.js, with npx create-react-app frontend I have implemented these command in my root folder and trying to run npm sta...
Mureil asked 24/12, 2020 at 10:20

7

In other threads I read that the issue might come when eslint and tsconfig.json are not in the same working folder, but I have all the files in the project's root folder. Somehow, after initializin...
Venator asked 4/12, 2020 at 4:28

3

Solved

I am implementing JWT in one of my node apps. I am wondering, if there is any definite format/ structure in which a refresh token should be generated? By definite format I mean whether a refresh ...
Gee asked 14/5, 2019 at 14:41

18

I'm trying to upload an image (jpg/jpeg/png) from the browser to NodeJS. I have read through several tutorials and many posts on forums but very few seem to have this specific issue. I've made sur...
Illsorted asked 8/6, 2022 at 10:50

5

Hello my problem is I want to use the search query of mongoose. But I want to make a get request using a query. Why is that not possible? I do not understand this error. I am using version 5.10.0 o...
Compel asked 25/8, 2020 at 13:24

35

Solved

I'm new in nodeJS, started learning by following a trailer on youtube, everything goes well until I added the connect function if mongodb, mongo.connect("mongodb://localhost:27017/mydb") when I ...
Scalping asked 4/5, 2018 at 10:45

© 2022 - 2025 — McMap. All rights reserved.