const quilt = require('@quilt/quilt');
const haproxy = require('@quilt/haproxy');
const Mongo = require('@quilt/mongo');
const Node = require('@quilt/nodejs');
const infrastructure = require('../../config/infrastructure.js');

const deployment = quilt.createDeployment();
deployment.deploy(infrastructure);

const mongo = new Mongo(3);
const app = new Node({
  nWorker: 3,
  repo: 'https://github.com/tejasmanohar/node-todo.git',
  env: {
    PORT: '80',
    MONGO_URI: mongo.uri('mean-example'),
  },
});

const proxy = haproxy.simpleLoadBalancer(app.cluster);

mongo.allowFrom(app.cluster, mongo.port);
proxy.allowFrom(quilt.publicInternet, haproxy.exposedPort);

deployment.deploy([app, mongo, proxy]);

const quilt = require('@quilt/quilt');
const haproxy = require('@quilt/haproxy');
const Mongo = require('@quilt/mongo');
const Node = require('@quilt/nodejs');
const infrastructure = require('../../config/infrastructure.js');

const deployment = quilt.createDeployment();
deployment.deploy(infrastructure);

const mongo = new Mongo(3);
const app = new Node({
  nWorker: 3,
  repo: 'https://github.com/quilt/node-todo.git',
  env: {
    PORT: '80',
    MONGO_URI: mongo.uri('mean-example'),
  },
});

const proxy = haproxy.simpleLoadBalancer(app.cluster);

mongo.allowFrom(app.cluster, mongo.port);
proxy.allowFrom(quilt.publicInternet, haproxy.exposedPort);

deployment.deploy([app, mongo, proxy]);

Use the todo app within the Quilt organization
ci: Use the todo app within the Quilt organization

We control https://github.com/quilt/node-todo, and it's the repo used by
our demo repository.
