heroku

Action Cable issue: messages occasionally not delivering or occasionally sent to the wrong channel

£可爱£侵袭症+ 提交于 2021-02-07 19:01:22
问题 I'm using Action Cable for a chat application with many different channels. Everything is set up with Redis and Postgresql (to save messages) on Heroku and 95% of the time works great in development and production. Occasionally though, messages sent do not show up. The message is sent, it is saved in the database, but then it never shows up on the front end unless I refresh. Or, the message shows up in another channel for which it is not directed. Again, everything is properly saved in the

Failing to browse React application deployed to Heroku

筅森魡賤 提交于 2021-02-07 18:38:20
问题 When wirite https://tictactoesko.herokuapp.com/ in a browser then I recive folowing error message: Failed to compile ./src/index.js Module build failed: Error: Cannot find module 'eslint/lib/formatters/stylish' My index.js look like this import React from 'react' import ReactDOM from 'react-dom' import './index.css' import Game from './Game' ReactDOM.render(, document.getElementById('root')) My package.json looks like this { "name": "tic-tac-toe", "version": "0.1.0", "private": true,

Socket.io works with localhost but not on Heroku server

与世无争的帅哥 提交于 2021-02-07 12:32:26
问题 I am currently trying to use socket.io and a node.js server to communicate with a Unity script. I have everything hooked up and working with localhost, but for some reason when I port it to my Heroku server it can't connect. I'm assuming it might have something to do with the URL's? I'm new to socket.io so any help would be appreciated. My node.js server: var express = require('express'); var app = express(); var expressWs = require('express-ws')(app); var path = require('path'); var server =

Is there a programmatic way to know a node.js app is running in Heroku?

梦想与她 提交于 2021-02-07 12:30:15
问题 Is there some variable or function I can call to know if a node.js application is running inside Heroku? Something like: if (process.heroku) console.log("I'm in Heroku!"); 回答1: You can do this without setting custom environment variables. You can do it like this: if (process.env._ && process.env._.indexOf("heroku")) console.log("I'm in Heroku!"); This is possible because on a Heroku dyno the _ environment variable is set to /app/.heroku/node/bin/node . 回答2: You use for that usual environment

Set port number for the embedded h2 database

≡放荡痞女 提交于 2021-02-07 12:29:18
问题 I use h2 in-memory database only for the testing purposes. The default port seems to be 8082 , which causes my tests to fail on heroku. I want to change this port number. How can I do that ? What I've done so far: There seems to be a file on my local machine ( $USER_HOME/.h2.server.properties ) that specifies this port. Let alone it is very strange to have that file outside of the application workspace, I cannot check it in heroku. I tried to set webPort , port in application-test.properties

Set port number for the embedded h2 database

狂风中的少年 提交于 2021-02-07 12:29:05
问题 I use h2 in-memory database only for the testing purposes. The default port seems to be 8082 , which causes my tests to fail on heroku. I want to change this port number. How can I do that ? What I've done so far: There seems to be a file on my local machine ( $USER_HOME/.h2.server.properties ) that specifies this port. Let alone it is very strange to have that file outside of the application workspace, I cannot check it in heroku. I tried to set webPort , port in application-test.properties

How to deploy pytesseract to Heroku

一笑奈何 提交于 2021-02-07 10:25:44
问题 I have a Python app which words great via Localhost on my machine. I am trying to deploy it to Heroku. However it does not seem possible to accomplish this (I have spent approx 30 hours trying now). The problem is Tesseract OCR. I am using the pytesseract wrapper, and my code utilises this. However, no matter what I try, it does not seem to be possible to use pytesseract when it is uploaded to Heroku. Could anyone either suggest how to go about deploying a Hello World Tesseract OCR Python app

Heroku - push subtrees to different apps

偶尔善良 提交于 2021-02-07 09:29:29
问题 I have a two-part app (a Phoenix API and a React front-end) that I want to deploy to Heroku... the back-end and front-end need to run on separate servers, but the current app structure is like so: app/ | + Phoenix/ | + React/ | + .git/ So both parts of the app are in the same git repo. Within app/ , I created two different Heroku apps - I'll call them phoenix-heroku-app and react-heroku-app . My plan is to use the git subtree method to push these apps up to Heroku, but I'm not sure how to

Heroku - push subtrees to different apps

人盡茶涼 提交于 2021-02-07 09:29:00
问题 I have a two-part app (a Phoenix API and a React front-end) that I want to deploy to Heroku... the back-end and front-end need to run on separate servers, but the current app structure is like so: app/ | + Phoenix/ | + React/ | + .git/ So both parts of the app are in the same git repo. Within app/ , I created two different Heroku apps - I'll call them phoenix-heroku-app and react-heroku-app . My plan is to use the git subtree method to push these apps up to Heroku, but I'm not sure how to

How do I change the rendered template in Flask when a thread completes?

不想你离开。 提交于 2021-02-07 08:47:34
问题 I have a function that crawls the web for data and computes a score for the search. However, this can take a while and sometimes the webpage times out before finishing execution. So I created a separate thread that executes the function and loading.html that tells the client that data is still being collected. Once the function ends in the thread, how do I reload the webpage to display output.html that displays the score. This is a simpler version of what I have so far: from flask import