digital-ocean

Express 4 middleware not calling routes on DigitalOcean server

穿精又带淫゛_ 提交于 2019-12-13 18:16:05
问题 I'm messing around with creating an API with io.js and Express 4, and I have no idea why this isn't working. I am currently running the program on a DigitalOcean droplet (Ubuntu 14.04) and it is not calling the next() method never gets called/executed. The program is being routed to by a reverse proxy with nginx at https://<redacted>/asdf . var express = require('express'); var app = express(); var port = process.env.PORT || 3000; var router = express.Router(); router.use(function(req, res,

DigitalOcean: How to run Docker command on newly created Droplet via Java API

让人想犯罪 __ 提交于 2019-12-13 17:22:37
问题 I'm trying to create a new Droplet and then kick off a Docker command via a UserData bash script. I set the user data via the Java API when creating the droplet and observe that the test files and logs I made are created. newDroplet.setUserData("#!/bin/bash\n" + "touch /test.txt;"+ "docker login --username=myname--password=mypass > /loginlog;"+ "docker pull mybuild > /pulllog;"+ "docker run --log-opt max-size=1g --net host --name myserver -t -i mybuild > /runlog;"); loginlog and pulllog both

Laravel Memory Issue?

萝らか妹 提交于 2019-12-13 17:21:57
问题 dear all i am facing such problem on DO server, i have tried everything , the whole site is working 100% properly on linux server using Homestead but after uploading it , it works for one time , going down many times after reloading or refreshing the page . - i tried to increase the memory of the apache server - i also tried to track the laravel.log but no any issues. - i also deleted the compiled.php in addition of composer clear-cache + php artisan cache:clear + php artisan optimize but no

How to set the root application directory?

 ̄綄美尐妖づ 提交于 2019-12-13 05:18:07
问题 I have created my first droplet, but I don't know how to set the root application directory? I tried to create a folder for my app name in /home/dokku/app_name Then, I did cd app_name and then git init Then I added a remote repo: git remote add dokku root@do.mydomain.com:app_name But, when try to push I get error: fatal: 'app_name' does not appear to be a git repository fatal: The remote end hung up unexpectedly How to configure this? How to set the root application directory? 回答1: Follow the

How to save and exit redis.conf?

天大地大妈咪最大 提交于 2019-12-13 04:13:43
问题 I'm installing and Configuring Redis on Ubuntu 16.04 in digtalocean, following this tutorial https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04 . When it goes to 'Save and close the file when you are finished.' I have no idea what's the right command to close and save it. I tried to use :wq ,but it didn't work. Any friend can give me some advice? 回答1: The tutorial tells you to use to use nano . If you followed it your screen should look more or

How to run an express App in Digitial ocean/AWS/GCP and use mailservice from cpanel(webmail)

戏子无情 提交于 2019-12-13 03:05:22
问题 My scenario is am running my server in cloud platform which doesn't have cpanel, what I have is another normal shared hosting service with cpanel support . is there any way to run the site in cloud and use the webmail service provided by shared hosting provider for my domain name? if there is anyway can anyone please explain how to do this as I don't want to shell out money to setup gsuite kind of service. Thanks in advance 回答1: finally, I figured it out on my own with some research in google

Strongloop iOS LBUser Extension Error 422 in Post

本秂侑毒 提交于 2019-12-13 00:44:26
问题 I'm trying to create and save a user extension of LBUser to the server with this code: LBRESTAdapter *adapter = ((AppDelegate *)[[UIApplication sharedApplication] delegate]).adapter; if (adapter) { TeacherRepository *repo = (TeacherRepository *)[adapter repositoryWithClass:[TeacherRepository class]]; if (repo) { Teacher *st = (Teacher *)[repo createUserWithEmail:@"test@test.com" password:@"test"]; st.bigarea = @"Mathematics"; NSLog(@"Email: %@", st.email); NSLog(@"Password: %@", st.password);

Installing PHP 7 on digitalocean

删除回忆录丶 提交于 2019-12-12 18:33:28
问题 I'm trying to use PHP 7 on digitalocean but the scripts inside files won't run. This is what I used for install: sudo apt-get install php7 libapache2-mod-php7 php7-mcrypt I can do php --version and I get: PHP 7.0.8-0ubuntu0.16.04.3 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.8-0ubuntu0.16.04.3, Copyright (c) 1999-2016, by Zend Technologies But when I check a file with <?php echo "test"; ?> on the

Cannot Get Laravel Welcome Page to Show

眉间皱痕 提交于 2019-12-12 17:19:45
问题 My server is on DigitalOcean cloud. I am using Ubuntu with Apache web server. My home computer is running Windows 7. I am using putty for terminal. Followed all of the directions on https://laracasts.com/series/laravel-5-fundamentals/episodes/1. Made it up to 8:40, where it directs you to run php -S localhost:8888 -t public . I run that, then open a web browser and tried the following: -http://mywebsite.com:8888 -http://www.mywebsite.com:8888 -http://mywebsite.com/learning-laravel-5/public

How to host 3 node apps with 3 different domains on one VPS?

让人想犯罪 __ 提交于 2019-12-12 11:15:14
问题 I'm stuck trying to setup up several Node apps on different domains on one Digital Ocean droplet. I followed the Host Multiple Node.js Applications On a Single VPS with nginx, forever, and crontab article exactly. I have the domains all pointed correctly and A records set. I can't seem to get apps to run (with forever) on any other port besides the default express 3000. I changed the Nginx settings like it asked: I uncommented the server_names_hash_bucket_size 64; (like it says) I created