Get your copy backlog programatically.
https://console-api.atom-data.io/api/external/v1/copybacklog/:target_id/:schema_name/:table_name/?key=<api key>
| 'use strict'; | |
| const Repository = require('../../../model/Repository') | |
| , LambdaRunner = require('../../../lib/lambda-co-runner'); | |
| function *main(e) { | |
| let query = e.queryParams.q | |
| , res = yield Repository.search(query); | |
| return {items: res.items}; | |
| } |
| 'use strict'; | |
| const request = require('axios'); | |
| function *search(query) { | |
| let options = { | |
| params: { | |
| q: query, | |
| sort: 'stars', | |
| order: 'desc' |
| { | |
| "name": "SampleProject", | |
| "description": "A demo project of serverless ci", | |
| "role": "arn:aws:iam::<aws account number>:role/<lambda role name>", | |
| "runtime":"nodejs4.3", | |
| "memory": 128, | |
| "timeout": 10, | |
| "handler": "lib.default", | |
| "hooks": { | |
| "build": "../../../node_modules/.bin/webpack --config ../../../infra/webpack.config.js", |
| module.exports = { | |
| entry: './src/index.js', | |
| target: 'node', | |
| output: { | |
| path: './lib', | |
| filename: 'index.js', | |
| libraryTarget: 'commonjs2' | |
| }, | |
| externals: { | |
| 'aws-sdk': 'aws-sdk' |
| FROM node:4.2.3 | |
| # Install Apex | |
| WORKDIR /tmp | |
| RUN wget https://raw.githubusercontent.com/apex/apex/master/install.sh && bash /tmp/install.sh | |
| # Install dependencies | |
| COPY package.json /srv/package.json | |
| WORKDIR /srv | |
| RUN npm i && mkdir /srv/src && mkdir /srv/infra |
| #!/bin/bash -e | |
| PATH_TO_AWS_CREDENTIALS=~/.aws/credentials | |
| AWS_REGION=us-east-1 | |
| # build the image | |
| docker build . -t apex-lambda-deployer | |
| # run unit tests | |
| docker run apex-lambda-deployer npm test |
| // Source: express.js website: https://expressjs.com/en/guide/routing.html | |
| var express = require('express') | |
| var app = express() | |
| // respond with "hello world" when a GET request is made to the homepage | |
| app.get('/', function (req, res) { | |
| res.send('hello world') | |
| }) |
| { | |
| "description": "search for github repos", | |
| "x-api-gateway": { | |
| "method": "post", | |
| "path": "/repos/{id}", | |
| "parameters":[ | |
| { | |
| // configuration of input params. Skipped for brevity | |
| // check out a real example: https://github.com/rotemtam/serverless-ci-example/blob/master/src/functions/getRepositories/function.json | |
| } |
| { | |
| "swagger": "2.0", | |
| "info": { | |
| "version": "2017-02-26T12:58:40Z", | |
| "title": "SampleProject" | |
| }, | |
| "host": "<host_id>.execute-api.us-east-1.amazonaws.com", | |
| "basePath": "/dev", | |
| "schemes": [ | |
| "https" |