I'm trying to fetch an image from the web and encode it with base64. what i have so far is basically: var request = require('request'); var BufferList = requi
This is my app that I'm currently running on production. var app = express(); app.set('views',settings.c.WEB_PATH + '/public/templates'); app.set('view engine',
I'm using JWT - jsonwebtokens in Nodejs. I'm creating a token and want to throw an error if the token expires. My token is created successfully and I'm checking
[`const express = require('express'); const app = express(); const https = require('https'); const url = "https://api.thevirustracker.com/free-api?countryTimeli
When trying to test Stripe Connect Api, I get the following error: 'StripeInvalidRequestError: You can only create new accounts if you've signed up for Connect
I am using cookie-parser in my express app. When the root page is requested I set a random number on the cookie using res.cookie(name, value) and it sets it fin
I'm developing NextJS app with custom server by ExpressJS, and the app cannot show external image, code example: export function DocumentSection({content}) {
Based on a condition, I need to destroy user's current session, and redirect him to a login page with a message. I use flash to have a show-once-only message. E
I am using the Express framework in node.js with some middleware functions: var app = express.createServer(options); app.use(User.checkUser); I can use the .
For the sake of testing, I need to provide a signed cookie with HTTP request. So that, my Express app server can consider it as a signed cookie and put it into
I build a expressJs app by ES6 and I got the below error: (node:4132) ExperimentalWarning: The ESM module loader is experimental. internal/modules/run_main.js:
I am new to node and express. I have seen app.get and app.post examples using both "res.send" and "return res.send". Are these the same? var express = require
I use Morgan (default express generator request logger), and I'm trying to disable it during unit testing. Currently I'm using the default configuration, which
I want to allow my server to let two different domains read data without getting a CORS issue. Therefore, I wrote the following code line (in node.js): app.
I am trying to implement login feature in Express.js version 4 app. I need to determine whether an user is logged in before he can do certain actions. So I have
How can I move files (like mv command shell) on node.js? Is there any method for that or should I read a file, write to a new file and remove older file?
Goal: I would like to achieve github style routing, where abcd in github.com/abcd could resolve to a user profile page or a team page. I currently have a v
I am writing an express app that sits behind an nginx server. I was reading through express's documentation and it mentioned the 'trust proxy' setting. All it
First time using Node js, Express and Vue. I have a pomodoro timer website made with vue (not vue-app/vue-cli) which I'm wanting to upload to Heroku. The websi
My react app is up on localhost:3000 and node server is running on localhost:5000. When I am trying to connect to the express API the route is going to 'localho