Category : heroku

I am writing a node.js app using Heroku and PostgreSQL. But when I try to make a request through Heroku it times out. Here are the Heroku logs: 2021-05-15T18:33:34.397049+00:00 heroku[router]: at=info method=GET path="/login" host=aiposizi-test-api.herokuapp.com request_id=beb5b18d-9ecb-4730-b886-a5175c021377 fwd="37.214.57.227" dyno=web.1 connect=0ms service=53ms status=200 bytes=787 protocol=https 2021-05-15T18:34:10.015665+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=POST path="/login" host=aiposizi-test-api.herokuapp.com request_id=f4e73df8-5116-426d-99a0-a2bfb08f3d16 fwd="37.214.57.227" dyno=web.1 connect=0ms ..

Read more

I’ve looked through all of the documentation, and I’m having some trouble finding examples of the correct implementation. First of all, I have the Heroku Redis add-on as you can see below: https://i.stack.imgur.com/9kcXW.png I installed Redis and Bull to my Node.js environment and set up Redis as follows: const redis = require(‘redis’); const Queue = ..

Read more

So in my application, I’m using a Postgres DB in a Node.js environment that’s deployed to Heroku. I realized that in all of my queries, I don’t have a db.release() or db.end(), and I think I need to have those at the end of my functions. I’ve tried looking around stack and other articles to ..

Read more

I’ve backend in node.js, and frontend in react. My directories are like this: –website –git —frontend —build —backend —server I configured my node application to work like this: if (process.env.NODE_ENV === ‘production’) { // app.use(express.static(path.resolve(__dirname, ‘public’))) app.use(express.static(path.resolve(__dirname, ‘../frontend/build’, ‘index.html’))) } else { …cors app.use(cors(corsOptions)) } And app.get(‘/**’, (req, res) => { res.sendFile(path.join(__dirname, ‘../frontend/build’, ‘index.html’)) }) ..

Read more

I think this is an issue that just popped up with Heroku and Puppeteer because someone asked the same exact thing a few days ago: https://ittone.ma/ittone/javascript-puppeteer-works-locally-but-not-when-pushed-to-heroku/ I have the same exact error here, which leads me to believe it’s something with the setup of the scraper browser or something. Mine looks like: const preparePageForTests = ..

Read more

This is my folder structure I have these configurations in my index.js for rendering express-handlebars files. const express = require(“express”); const hbs = require(“express-handlebars”); const app = express(); app.set(“view engine”, “hbs”); app.use(express.static(__dirname +’/public’)); app.engine( “hbs”, hbs({ extname: “hbs”, layoutsDir: __dirname + ‘/views’, defaultLayout: “index”, }) ); And from a route I’m sending res.render(‘index’,{Name: response.data.Name, Email: ..

Read more