

- #Hipchat download automatically files install
- #Hipchat download automatically files code
- #Hipchat download automatically files windows
set ( 'port', port ) // Configure the Handlebars view engineĪpp. get ( 'env' ) = 'development' // Load the HipChat AC compat layer var hipchat = require ( 'atlassian-connect-express-hipchat' ) (addon, app ) // The following settings applies to all environmentsĪpp. port ( ) // Declares the environment to use in `config.js` var devEnv = app. views are HBS templates var viewsDir = _dirname + '/views' // Your routes live here this is the C in MVC var routes = require ( './routes' ) // Bootstrap Express var app = express ( ) // Bootstrap the `atlassian-connect-express` library var addon = ac (app ) // You can set this in `config.js` var port = addon. join (_dirname, 'public' ) // Anything in. public is served up as static content var staticDir = path. register ( 'redis', require ( 'atlassian-connect-express-redis' ) ) // Anything in.
#Hipchat download automatically files windows
cwd ( ) // Fix expiry on Windows :( // Static expiry middleware to help serve static resources efficiently var expiry = require ( 'static-expiry' ) // We use () as our view engine // via () var hbs = require ( 'express-hbs' ) // We also need a few stock Node modules var http = require ( 'http' ) var path = require ( 'path' ) var os = require ( 'os' ) // Let's use Redis to store our dataĪc. This is the entry point for your add-on, creating and configuring // your add-on HTTP server // () is your friend - it's the underlying // web framework that `atlassian-connect-express` uses var express = require ( 'express' ) // You need to load `atlassian-connect-express` to use her godly powers var ac = require ( 'atlassian-connect-express' ) webhook we’re specifying a callback URL (web-hook) that is called when a message is posted to a room that begins with “ /hascode“.

#Hipchat download automatically files install
Upon install we’re receiving the OAuth2 credentials and the clientId that we need to store to enable further communication between our application and the remote HipChat instance. installable we’re specifying a callback URL that is called when someone installs our plug-in or removes it from a HipChat instance.hipchatApiConsumer we’re requesting concrete permissions that are granted to our integration upon install – for our plug-in all we need here is the permission to send notifications as we want to post the result of our blog search into the room.More interesting is the capabilities section as here in the node First of all we’re adding some description about our plug-in and its vendor by specifying name, description, vendor etc. The plug-in descriptor is used to install the integration into the HipChat instance and to display requested permissions and web-hooks to establish interaction between HipChat and our application. The remote application now sends a search request to the blog, parses the result, generates a view-friendly message and sends the message to the chat-room using the REST-API and OAuth2.When now in a chat-room the blog article search is triggered by a user, HipChat forwards the event to our remote application.HipChat stores the plug-in meta-data, web-hooks etc and confirms the successful installation to the requesting user.
#Hipchat download automatically files code
If this happens, our remote application stores this information in a database and responds with a success message and status code.HipChat sends a request to our remote application with a specific JSON structure that contains important information like the OAuth2 credentials.


HipChat is only configured to call this remote instance on specific events, called web-hooks. Integrations are not deployed within the HipChat server but must be run as a separate server instance. Technologies used for building a HipChat Integration.
