How to use atlassian-connect-express - 1 common examples

To help you get started, we’ve selected a few atlassian-connect-express examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mtmendonca / ace-boilerplate / api / src / app.js View on Github external
import http from 'http';
import express from 'express';
import AtlasConnectExpress from 'atlassian-connect-express';
import bodyParser from 'body-parser';
import helmet from 'helmet';
import addMiddleware from './middleware';
import addRoutes from './routes';
import createServer from './server';

// create express application
const app = express();
// secure your app with helmet defaults at least
app.use(helmet());
app.set('env', process.env.ENVIRONMENT); // atlas-connect-express needs this
// get atlas-connect addon instance
const ace = AtlasConnectExpress(app);
// add default atlas-connect middleware
app.use(ace.middleware());
// add body-parser middleware
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
// add application middleware
addMiddleware(app, ace);
// add routes defined in ./routes. Pass addon for authentication and jira api requests
addRoutes(app, ace);
// create graphql server
const server = createServer(app);
const httpServer = http.createServer(app);
server.installSubscriptionHandlers(httpServer);
// start the server
const PORT = process.env.API_PORT || 3000;
httpServer.listen({ port: PORT }, () => {

atlassian-connect-express

Library for building Atlassian Add-ons on top of Express

Apache-2.0
Latest version published 2 months ago

Package Health Score

57 / 100
Full package analysis

Popular atlassian-connect-express functions