heroku

Node JS environment variables and Heroku deployment

元气小坏坏 提交于 2020-02-02 08:32:09
问题 I have a project using the dotenv package to load my environment variables in my NodeJS application I use the following line var dotenv = require('dotenv').load({ silent: true }); //Example of use username: process.env.CONVERSATION_USERNAME I am now planning to deploy this application on Heroku. However, for some obvious security reasons i don't want to commit my .env file. I'm new to NodeJS and I would like to know if there is a way to say "If the .env file doesn't exists, load the

Develop a clock and workers in node.js on heroku

霸气de小男生 提交于 2020-02-02 03:02:53
问题 I'm working on a service that needs to analyze data from social media networks every five minutes for different users. I'm developing it in node.js and I will implement it on Heroku. According to this article on Heroku website, the best way to do that is separating the logic of the scheduler from the logic of the worker. In fact, the idea is to have one dyno dedicated to schedule tasks to avoid duplication. This dyno instructs a farm of workers (n dynos as needed) to do the tasks. Here is the

How to install GD on Heroku

谁说我不能喝 提交于 2020-02-01 03:08:07
问题 I am running Laravel 5.3 and trying to do some image manipulation. I get this error: GD Library extension not available with this PHP installation. I've tried putting gd in my composer.json "require": { "php": ">=5.6.4", "laravel/framework": "5.3.*", "mews/purifier": "~2.0", "vinkla/hashids": "^2.4", "barryvdh/laravel-debugbar": "^2.2", "fzaninotto/faker": "~1.4", "intervention/image": "^2.3", "gd": "*" }, and it didn't work. I also tried: "ext-gd": "*" and that didn't work either. I looked

How to see untrimmed logs on Heroku Local

回眸只為那壹抹淺笑 提交于 2020-02-01 01:33:04
问题 I'm running a NodeJS app on heroku local, however all my console.log statements and error messages get trimmed. For example: forego | starting web.1 on port 5000 web.1 | module.js:339 I don't see the full error logs. How to avoid this trimming of error messages? 回答1: heroku local will run whatever processes you tell it to in the Procfile. If you'd like to stream your development log, simply add something like log: tail -f log/development.log to your Procfile. You'll also want to make sure

Heroku and @font-face - embedded fonts wont display on Heroku

﹥>﹥吖頭↗ 提交于 2020-01-31 13:28:58
问题 I have a few licensed fonts that I have embedded into my Rails app using the CSS @font-face tag. These fonts are located in the "../Public/Fonts/" path in my Rails 3 app and render perfectly on any local machine that I pull down the repo and run on. However when I push my app to Heroku it can't seem to find the fonts. You can tell that it's looking in the font directory but can never access them. It doesn't seem to matter where I place the fonts or how I type the font path in the @font-face

Heroku and @font-face - embedded fonts wont display on Heroku

一世执手 提交于 2020-01-31 13:27:41
问题 I have a few licensed fonts that I have embedded into my Rails app using the CSS @font-face tag. These fonts are located in the "../Public/Fonts/" path in my Rails 3 app and render perfectly on any local machine that I pull down the repo and run on. However when I push my app to Heroku it can't seem to find the fonts. You can tell that it's looking in the font directory but can never access them. It doesn't seem to matter where I place the fonts or how I type the font path in the @font-face

Heroku missing required flag: -a,

蓝咒 提交于 2020-01-31 06:57:05
问题 I am currently doing a project and I am having issues with heroku. Here is the mistake that always pops up when I try to use a heroku command. Error in question For those of you who have had the same error, what is the possible cause for this? Thanks in advance! 回答1: Initialise with git: git init Get the app name: heroku apps Add remote: heroku git:remote -a your_app_name 回答2: When you create a Heroku app with heroku create my-app you need to provide the flag ( -a , --app ) to the add-on

Why my heroku node.js app is giving at=error code=H10 desc=“App crashed” method=GET path=“/”?

时光总嘲笑我的痴心妄想 提交于 2020-01-31 04:12:06
问题 I am trying to run my simple node app on Heroku. Here is the directory structure ├── app.js ├── assets ├── blog.html ├── index.html ├── node_modules └── package.json Here is my app.js let express = require('express'), path = require('path'); var app = express(); let server = require('http').Server(app); app.use(express.static(path.join(__dirname))); app.get('/', function(req, res, next){ res.sendStatus(200); }); app.get('/blog.html', function(req, res,next){ res.sendFile(path.join(__dirname+"

Heroku & Delayed Job - Autoscale Branch - RestClient::ResourceNotFound

别来无恙 提交于 2020-01-30 08:32:16
问题 SomeController#update (RestClient::ResourceNotFound) "Resource Not Found" I'm receiving this error (where previously I was not) while trying to enqueue delayed jobs using the autoscale branch of DelayedJob. This does not occur with a none autoscale branch but I'm at a loss to pinpoint what the problem is. If anyone is experiencing the same or can point me toward a likely cause I'd be grateful for advice. 回答1: Just a guess... Is it possible the ResourceNotFound is occurring because the heroku

Heroku app database resetting

左心房为你撑大大i 提交于 2020-01-30 06:35:30
问题 After running through Getting Started with Python on Heroku, I launched my first app. Everything seems to be working fine, but after a little while (a few hours maybe), the database resets. My hypothesis of the root cause is that my django app is using the default django database (SQLite I think) and Heroku supports postgres by default. I haven't tested this because it seems like quite a lot of work to change my app to postgres and it's something I'd rather not do now if I don't have to. In