This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const drugSearch = require('./functions/drugSearch/drugSearchCtrl'); | |
module.exports.getDrugIdentifiers = async (event) => { | |
return drugSearch.getDrugIdentifiers(event); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const nlmSearch = require('./services/nlmSearch'); | |
// Headers needed for Locked Down APIs | |
const headers = { | |
'Access-Control-Allow-Origin': '*', | |
'Access-Control-Allow-Headers': | |
'Origin, X-Requested-With, Content-Type, Accept, X-Api-Key, Authorization', | |
'Access-Control-Allow-Credentials': 'true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const apiUtil = require('../../../common/utils/apiUtil'); | |
const baseRxImageUrl = 'http://rximage.nlm.nih.gov/api/rximage/1'; | |
const nlmDataDiscoveryUrl = | |
'https://datadiscovery.nlm.nih.gov/resource/crzr-uvwg.json?'; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const axios = require('axios'); | |
exports.submitRequest = async function(url, headers) { | |
try { | |
let result = { | |
statusCode: 500, | |
data: {} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Serverless Drug Search Service | |
service: drug-search-service | |
provider: | |
name: aws | |
runtime: nodejs8.10 | |
stage: ${opt:stage, 'dev'} | |
region: us-east-1 | |
apiGateway: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const slsw = require('serverless-webpack'); | |
const nodeExternals = require('webpack-node-externals'); | |
module.exports = { | |
entry: slsw.lib.entries, | |
target: 'node', | |
devtool: 'source-map', | |
externals: [nodeExternals()], | |
mode: slsw.lib.webpack.isLocal ? 'development' : 'production', | |
optimization: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
"extends": ['eslint:recommended'], // extending recommended config and config derived from eslint-config-prettier | |
"plugins": ['prettier'], // activating esling-plugin-prettier (--fix stuff) | |
"rules": { | |
'prettier/prettier': [ // customizing prettier rules (unfortunately not many of them are customizable) | |
'error', | |
{ | |
"singleQuote": true, | |
"trailingComma": 'none', | |
"useTabs": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--timeout 5000 | |
--reporter list | |
--ui bdd | |
--exit | |
test/bootstrap.test.js | |
test/**/*.test.js | |
test/**/**/*.test.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: node_js | |
node_js: | |
- "10" | |
cache: | |
directories: | |
- node_modules | |
install: | |
- npm install -g serverless |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-undef */ | |
const { spawn } = require('child_process'); | |
const slsOfflineTestConfig = require('./support/slsOfflineTestConfig'); | |
let slsOfflineProcess; | |
before(function(done) { | |
// increase mocha timeout for this hook to allow sls offline to start | |
this.timeout(30000); |
OlderNewer