Category "express"

Running an Express server middleware alongside Nuxt

My endpoints aren't working, and most likely because the server on which express is isn't running correctly. I run my files with npm run dev and my express file

express debug module not working

I'm on Windows trying to use the debug module https://www.npmjs.org/package/debug I installed express-generator var debug = require('debug')('MyApp'); debug('

Handlebars registerHelper serverside with Expressjs

I am using expressjs with handlebars as templating engine with following code in Webstorm IDE with express generator.There is no visible handlebars require in t

render ejs template for robots.txt in express

I want to use some variables in my robots.txt file in Express. How can I render this file as an EJS template? I already have EJS working for .html files. app.

Express Session Does Not Save After Redirect

In my production app, saving data to a session then redirecting is completely unreliable. A console.log after saving the session shows the data has been attach

TypeError: app.get is not a function

I'm trying to use express in a prototype function ioServer() { } module.exports = ioServer; ioServer.prototype.start = function() { var app = requ

Error: Failed to lookup view "layout" in views directory

I am getting the error like Error: Failed to lookup view "layout" in views directory. Below is the source code of the files as well as the folder structure. in

Next.js Authentication with JWT

I am moving a project from React to Next.js and was wondering if the same authentication process is okay. Basically, the user enters their username and password

CardElement not showing ui components in react app ie `Card Number, MM/YY, CVC?

So my problem is that I cannot see the CardElement Ui component in the image below. It should be above the Order Total: $0 which is beside the payment method.

Import sql file using express js

I am trying to import the sql file in express js. i try the following codes but it is not work while using mssql and fs module fs.readFile(__dirname +'/databa

Nodejs Express on Heroku App EACCES 0.0.0.0:80

I am trying to run a Node app on a newly created Heroku App from their web. I followed their steps and still I am getting errors when displaying app status. I

"TypeError: require(...) is not a function" in nodejs and socketio

I am creating a chat with NodeJS, Express and Socket.Io, but I have this error when I want to run the code: require('./sockets')(socketio);

How to create a middle layer for two different servers running independently in node.js

I am trying to implement a node.js layer between two servers which will help in redirecting to the respective server on a route/url change, provided both the se

Can't create a simple webhook fulfillment Good Actions Console

I am trying to do a simple google home integration with my home server. My only goal is to have it say "Hey google, turn on pool lights" and "Hey Google, turn o

Express cors get origin = 'null' with type string

Express CORS is failing for my nodejs application and I need your help fixing it. The reason is that the app is getting null with type string as origin, which i

Change sequelize timezone

I want to make restful app in nodejs Server: centos 7 64x Database: postgresql Additional: express, sequelize Table: datetime with timezone When I selecting r

how to receive a multi select in expressjs

Hello I have a multi select that looks like this input.form-control(type='text', name='names[]') I want to retrieve does values. I'm using this var names =

Best way to store DB config in Node.Js / Express app

What would be the best way to store DB config (username, password) in an open source app that runs on node.js / Express? Two specific questions: Shall I put it

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'unlink' of undefined at Grid.remove

I'm trying to delete a file by its id using gridfs but I get this error when calling the delete API. Controller : let gfs; connect.once("open", () => { gf

tsc not found in typescript express and react app when deploying to heroku

I am working on an express app(in typescript) and a react app bootstrapped with create-react-app(in js). The directory structure is here. The server directory c