View release.yml
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
# Automatically creates a new tag, GitHub release, and PyPi release if poetry version doesn't match last release version | |
name: Release | |
on: | |
workflow_dispatch: | |
branches: | |
- main | |
push: | |
branches: |
View docker-compose.yml
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
version: '3.8' | |
services: | |
mongo: | |
image: mongo | |
restart: always | |
ports: | |
- 27017:27017 | |
bookapi: | |
image: bookapi |
View launch.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 IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type":"node", | |
"request":"launch", | |
"name":"Serverless Offline Debug", |
View drugSearchController.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
/* eslint-disable no-undef */ | |
/* eslint-disable no-unused-vars */ | |
const expect = require('chai').expect; | |
const sinon = require('sinon'); | |
let drugSearchCtrl = require('../../functions/drugSearch/drugSearchCtrl'); | |
let nlmSearch = require('../../functions/drugSearch/services/nlmSearch'); | |
describe('drugSearchCtrl getDrugIdentifiers', function drugSearchCtrlTest() { | |
// NLM Drug Search Service Spy |
View mocha.opts
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 |
View bootstrap.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
/* 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); |
View slsOfflineTestConfig.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
module.exports.getSlsOfflinePort = () => { | |
return process.env.PORT || '3005'; | |
}; |
View .eslintrc.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
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, |
View .travis.yml
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 |
View webpack.config.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
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: { |
NewerOlder