cloud9

Why is my Node Express Mongoose app making get requests to these sites?

旧巷老猫 提交于 2019-12-11 08:58:32
问题 I am running a Node (v 8.11.2), Express (with express-generator) and Mongoose app on a Ubuntu 16.04 server. I access it using AWS Cloud 9 service. In the console.log messages I see that my app is making GET requests to these sites which are of zero interest to my code. What or why is making these requests? GET http://www.baidu.com/?rands=_1989643718421222425724576 200 0.748 ms - 207 GET http://www.so.com/?rands=_144682544013674723168320 200 0.874 ms - 207 GET http://www.baidu.com/?rands=

VarName is not defined, please fix or add /*global VarName*/ Cloud9

你说的曾经没有我的故事 提交于 2019-12-10 13:49:06
问题 Objective Stop Cloud9 IDE from giving me the warning message. Background I am coding JavaScript using the Cloud9 IDE, and wherever I use a class from another file (in the same folder) I get the warning message: VarName is not defined, please fix or add /*global VarName*/ Now this bugs me and I want to fix it. The obvious solution would be to just add the comment /*global VarName*/ and be done with it, but I don't believe this is a good practice. What I tried After researching, I came across

Configure AWS Cloud9 to use Anaconda Python Environment

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want AWS Cloud9 to use the Python version and specific packages from my Anaconda Python environment. How can I achieve this? Where should I look in the settings or configuration? My current setup: I have an AWS EC2 instance with Ubuntu Linux, and I have configured AWS Cloud9 to work with the EC2 instance. I have Anaconda installed on the EC2 instance, and I have created a conda Python3 environment to use, but Cloud9 always wants to use my Linux system's installed Python3 version. 回答1: I finally found something that forces AWS Cloud9 to use

Cloud9 + rails + Postgresql usage

故事扮演 提交于 2019-12-02 11:58:22
I can not set up a Rails app using Postgresql for development on Cloud9 (c9.io): the migration does not succeed. Common error: ~/workspace (master) $ rake db:migrate rake aborted! PG::ConnectionBad: could not connect to server: Connection refused Is the server running on host "0.0.0.0" and accepting TCP/IP connections on port 5432? Cloud9 does not run PG by defalut. Below is the fast & easy way I use to use Postgresql on C9: 1. Gemfile.rb: gem 'pg' 2. Database.yml: default: &default adapter: postgresql encoding: unicode pool: 5 username: my_name password: my_pass host: <%= ENV['IP'] %>

projection not working with db.collection.find in mongo [duplicate]

丶灬走出姿态 提交于 2019-12-01 03:03:56
This question already has an answer here: batchSize field name ignored in Field Projection 2 answers I have started to use mongodb just a day back and have encountered an issue. I searched on net and stackoverflow for how to hide _id value in final answer and following the answers provided I tried to get my code run but still the _id part shows. P.S.: I am using cloud9 as the ide. var mongo = require('mongodb').MongoClient; mongo.connect('mongodb://localhost:27017/learnyoumongo', function(err, database) { if(err) throw err; const db = database.db('learnyoumongo'); var parrots = db.collection(

Could not find include include file

一个人想着一个人 提交于 2019-11-30 09:02:02
问题 I'm running a simple server var express = require('express') var app = express() app.set('view engine', 'ejs'); app.use(express.static('public')) // home page request handler app.get('/', function (req, res) { res.render('home') }) // initializes request listener app.listen(process.env.PORT, process.env.IP, function(){ console.log("Server is listening"); }) When I make a GET request for the home page, run-time throws the following error Error: Could not find include include file. at

Python3/cloud9/lambda - making imported modules available to lambda

余生长醉 提交于 2019-11-29 07:25:10
Using sqlobject. When I import the module I get a unable to load module error when running lambda local or remote. The module is installed and if I get a command line python3 interpreter and import the module it imports just fine. How do I get 3rd party modules installed so they work with both lambda local and lambda remote? Code could not be simpler: import sqlobject Answering my own question... These are instructions for Python 3. First start with an empty environment, mine was called cycles. Create a new lambda function: Your folder structure now looks like this: There will be two folders

Python3/cloud9/lambda - making imported modules available to lambda

左心房为你撑大大i 提交于 2019-11-27 18:50:27
问题 Using sqlobject. When I import the module I get a unable to load module error when running lambda local or remote. The module is installed and if I get a command line python3 interpreter and import the module it imports just fine. How do I get 3rd party modules installed so they work with both lambda local and lambda remote? Code could not be simpler: import sqlobject 回答1: Answering my own question... These are instructions for Python 3. First start with an empty environment, mine was called

I am getting an “Invalid Host header” message, when running my React app in a Webpack dev server on Cloud9.io

﹥>﹥吖頭↗ 提交于 2019-11-27 17:05:34
I am using as an environment, a Cloud9.io ubuntu VM Online IDE and I have reduced by troubleshooting this error to just running the app with Webpack dev server. I launch it with: webpack-dev-server -d --watch --history-api-fallback --host $IP --port $PORT $IP is a variable that has the host address $PORT has the port number. I am instructed to use these vars when deploying an app in Cloud 9, as they have the default IP and PORT info. The server boots up and compiles the code, no problem, it is not showing me the index file though. Only a blank screen with "Invalid Host header" as text. This is

I am getting an “Invalid Host header” message, when running my React app in a Webpack dev server on Cloud9.io

安稳与你 提交于 2019-11-26 22:30:54
问题 I am using as an environment, a Cloud9.io ubuntu VM Online IDE and I have reduced by troubleshooting this error to just running the app with Webpack dev server. I launch it with: webpack-dev-server -d --watch --history-api-fallback --host $IP --port $PORT $IP is a variable that has the host address $PORT has the port number. I am instructed to use these vars when deploying an app in Cloud 9, as they have the default IP and PORT info. The server boots up and compiles the code, no problem, it