Comments (4)
If possible, let's try to have these discussions in the Jive Community for best visibility.
https://community.jivesoftware.com/community/developer
As a possible suggestion, with Heroku, did you change the port from 8090 to 80?
from jive-sdk.
@ryanrutan yes, we did make the port number change from 8090
to 80
, @theshanx and I explicitly mentioned it above, but it was in the middle so likely easy to overlook.
from jive-sdk.
Heroku doesn't allow you to pick the port you listen on. Instead you need to listen on "process.env.PORT". See app.js "startServer" function and change the line the listens to:
var server = http.createServer(app).listen( process.env.PORT || 5000, function () {
from jive-sdk.
Hi there, here is how my app.js looks like, to make it work with heroku. Notice I am using mongoDB. Because Heroku has a virtual file system, file persistence will not work, so you will need to setup using mongoDB in heroku. Your package.json should have this dependency:
"jive-persistence-mongo" : "*"
And your jiveclientconfiguration.json should have this:
"persistence" : "jive-persistence-mongo"
Here is my app.js:
var express = require('express'),
http = require('http'),
jive = require('jive-sdk');
var app = express();
var failServer = function(reason) {
console.log('FATAL -', reason );
process.exit(-1);
};
var startServer = function () {
if ( !jive.service.role || jive.service.role.isHttp() ) {
var server = http.createServer(app).listen( app.get('port') || 8090, function () {
console.log("Express server listening on port " + server.address().port);
});
}
};
jive.util.fsreadJson('jiveclientconfiguration.json').then( function(options) {
options['port'] = process.env.PORT || options['port'];
options['databaseUrl'] = process.env.MONGOLAB_URI || process.env.MONGOHQ_URL || options['databaseUrl'];
jive.service.init(app, options)
.then( function() { return jive.service.autowire() } )
.then( function() { return jive.service.start() } ).then( startServer, failServer );
});
from jive-sdk.
Related Issues (20)
- Replace relative image links with fully qualified paths in the docs HOT 1
- Replace relative image links with fully qualified paths in the docs HOT 3
- Create comment syncing example HOT 1
- Choose better icons (not CNN icons) for all examples in jive-sdk generated samples
- Change generated "app" directory to "osapp" directory... HOT 1
- Add jive.service.analytics API Class to Streamline Add-On Access to Analytics APIs
- fs.rename doesn't work cross-filesystems HOT 4
- Upgrade to express 4.0 HOT 1
- Why is `*` used for version in package.json? HOT 2
- incorrect commandline arguments documented HOT 4
- [Bug] in "sampletile-activity" HOT 1
- jive.community.doRequest looks for community for no reason HOT 4
- extension creation meta from jiveclientconfiguration.json - defaults override settings
- How to get an activity by external ID HOT 4
- OAuth only working for the first time HOT 1
- A test issue to be closed soon HOT 9
- apphosting="jive" Not Creating /extension_src/public assets for non-Tile-App Tile Types
- esf template fails
- simple stream object.description does not display
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jive-sdk.