appfog

Set datasource values during run time

佐手、 提交于 2019-12-24 14:40:29
问题 So essentially I'm trying to get my project up and running on AppFog. The datasource information is stored in an enviornment variable, which is essentially JSON. My goal is to take this data and set my datasource config from it. Here is what I have tried: Code to set the datasource config which is a method in a POGO. The POGO is instantiated and the method called at the beginning of DataSource.groovy: import appfog.ParseDataSource new ParseDataSource().setConfig() dataSource { ... } class

Yii removing application directory name from URL

拥有回忆 提交于 2019-12-22 14:06:41
问题 Okay seems like this is a pretty common problem, but I can't find a definitive solution on the forums. My Yii is set up like this /webroot/framework /webroot/app /webroot/requirements The app folder hosts the yii application however my url looks like : site[dot]com/app/site/index How do I remove the 'app' portion from the URL. I tried moving my .htaccess file to the webroot folder and it redirects but 'app' still shows up in the url Here are the contents of /webroot/.htaccess <IfModule mod

Sessions on AppFog with ExpressJS

放肆的年华 提交于 2019-12-22 11:29:26
问题 I get a problem with sessions on my ExpressJS App. In local it works perfectly but when I host my App on AppFog I get some issues with the sessions, they are lost sometimes... In my admin panel. I don't know why but, when the page is refreshed, the sessions no longer to work... var restrictedArea = function(req, res, next) { if( req.session.access ) next(); else res.redirect('/signin'); } // Get/Post example on admin panel app.get('/posts/add', restrictedArea, admin.addPost); app.post('/posts

On appfog, how to find the reason for 500 Internal Server Error?

断了今生、忘了曾经 提交于 2019-12-21 06:29:25
问题 I have created a simple python flask application, which is working fine at http://cm-test.aws.af.cm/ But, when you access it on the route http://cm-test.aws.af.cm/redis it fails with "500 Internal Server Error" The problem is, I can't find a way to see some log or error message about the problem... Is this syntax error, or exception, or something else? How can I get more information about this error? I can't find nothing on the dashboard and there is nothing in the logs ("af logs cm-test")

On appfog, how to find the reason for 500 Internal Server Error?

守給你的承諾、 提交于 2019-12-21 06:29:21
问题 I have created a simple python flask application, which is working fine at http://cm-test.aws.af.cm/ But, when you access it on the route http://cm-test.aws.af.cm/redis it fails with "500 Internal Server Error" The problem is, I can't find a way to see some log or error message about the problem... Is this syntax error, or exception, or something else? How can I get more information about this error? I can't find nothing on the dashboard and there is nothing in the logs ("af logs cm-test")

Node.js TCP Socket Server on the Cloud [Heroku/AppFog]

我只是一个虾纸丫 提交于 2019-12-18 12:26:17
问题 Is is possible to run a Node.js TCP Socket oriented application on the Cloud , more specifically on Heroku or AppFog . It's not going to be a web application, but a server for access with a client program. The basic idea is to use the capabilities of the Cloud - scaling and an easy to use platform. I know that such application could easily run on IaaS like Amazon AWS , but I would really like to take advantage of the PaaS features of Heroku or AppFog . 回答1: I am reasonably sure that doesn't

How to get mongodb working on appfog?

回眸只為那壹抹淺笑 提交于 2019-12-13 07:05:50
问题 I'm new to nodeJS, so i was just trying couple of things starting from basics. I had a problem while retrieving data from MongoDB, So here is the code: var port = (process.env.VMC_APP_PORT || 3000); var host = (process.env.VCAP_APP_HOST || 'localhost'); var http = require('http'); var mongo = require('mongodb'); http.createServer(function (req, res) { var mongoUrl = "mongodb://<userid>:<password>@linus.mongohq.com:10090/<db>"; if (process.env.VCAP_SERVICES) { mongoUrl = process.env.MONGOHQ

AppFog error when updating

点点圈 提交于 2019-12-12 19:53:10
问题 I always get this error when I'm updating my files in my appfog cloud hosting. Uploading Application: Checking for available resources: OK Packing application: OK Uploading (7K): OK Push Status: OK Stopping Application 'volkova': OK Staging Application 'volkova': OK Starting Application 'volkova': . Error: Application [volkova] failed to start, logs information below. ====> /logs/stderr.log <==== ./startup: line 3: /opt/cloudfoundry/runtimes/nodejs-v0.6.17/bin/node: Permission denied What is

App Fog Rails Migrate Database

你。 提交于 2019-12-11 02:18:36
问题 How am I supposed to migrate Rails application database in App Fog? For example, on Heroku after the first deployment you have to run: $ heroku run rake db:migrate Is there a similar command or the database is deployed automatically on App Fog? P.S. I didn't found documentation for this. Does it configure the database automatically by generating the database.yml file like on Heroku? 回答1: There is actually some documentation on here. Basically, you create a Caldecott tunnel with af tunnel ,

Sessions on AppFog with ExpressJS

做~自己de王妃 提交于 2019-12-06 13:43:20
I get a problem with sessions on my ExpressJS App. In local it works perfectly but when I host my App on AppFog I get some issues with the sessions, they are lost sometimes... In my admin panel. I don't know why but, when the page is refreshed, the sessions no longer to work... var restrictedArea = function(req, res, next) { if( req.session.access ) next(); else res.redirect('/signin'); } // Get/Post example on admin panel app.get('/posts/add', restrictedArea, admin.addPost); app.post('/posts/add', restrictedArea, admin.savePost); app.post('/posts/delete', restrictedArea, admin.deletePost);