Skip to content

Commit 46c7715

Browse files
committed
Add 'human-connection-api/' from commit 'bccc49a03aa36d17582261cdbd240a669b244af2'
git-subtree-dir: human-connection-api git-subtree-mainline: 28e2a71 git-subtree-split: bccc49a
2 parents 28e2a71 + bccc49a commit 46c7715

File tree

285 files changed

+23652
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

285 files changed

+23652
-0
lines changed

human-connection-api/.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
npm-debug.log
3+
Dockerfile

human-connection-api/.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

human-connection-api/.eslintrc.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"parser": "babel-eslint",
3+
"env": {
4+
"es6": true,
5+
"node": true,
6+
"mocha": true
7+
},
8+
"extends": "eslint:recommended",
9+
"rules": {
10+
"indent": [
11+
"error",
12+
2
13+
],
14+
"quotes": [
15+
"error",
16+
"single"
17+
],
18+
"semi": [
19+
"error",
20+
"always"
21+
]
22+
}
23+
}

human-connection-api/.gitattributes

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# These files are text and should be normalized (Convert crlf => lf)
2+
*.php text
3+
*.css text
4+
*.js text
5+
*.htm text
6+
*.html text
7+
*.xml text
8+
*.txt text
9+
*.ini text
10+
*.inc text
11+
.htaccess text
12+
13+
# These files are binary and should be left untouched
14+
# (binary is a macro for -text -diff)
15+
*.png binary
16+
*.jpg binary
17+
*.jpeg binary
18+
*.gif binary
19+
*.ico binary
20+
*.mov binary
21+
*.mp4 binary
22+
*.mp3 binary
23+
*.flv binary
24+
*.fla binary
25+
*.swf binary
26+
*.gz binary
27+
*.zip binary
28+
*.7z binary
29+
*.ttf binary
30+
31+
# Auto detect text files and perform LF normalization
32+
# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
33+
* text=auto
34+
35+
# Documents
36+
*.doc diff=astextplain
37+
*.DOC diff=astextplain
38+
*.docx diff=astextplain
39+
*.DOCX diff=astextplain
40+
*.dot diff=astextplain
41+
*.DOT diff=astextplain
42+
*.pdf diff=astextplain
43+
*.PDF diff=astextplain
44+
*.rtf diff=astextplain
45+
*.RTF diff=astextplain
46+

human-connection-api/.gitignore

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Directory for instrumented libs generated by jscoverage/JSCover
11+
lib-cov
12+
13+
# Coverage directory used by tools like istanbul
14+
coverage
15+
16+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17+
.grunt
18+
19+
# Compiled binary addons (http://nodejs.org/api/addons.html)
20+
build/Release
21+
22+
# Dependency directory
23+
# Commenting this out is preferred by some people, see
24+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
25+
node_modules
26+
27+
# Users Environment Variables
28+
.lock-wscript
29+
30+
# IDEs and editors (shamelessly copied from @angular/cli's .gitignore)
31+
/.idea
32+
.project
33+
.classpath
34+
.c9/
35+
.vscode
36+
*.launch
37+
.settings/
38+
*.sublime-workspace
39+
40+
# IDE - NetBeans
41+
nbproject
42+
43+
# IDE - VSCode
44+
.vscode/*
45+
!.vscode/settings.json
46+
!.vscode/tasks.json
47+
!.vscode/launch.json
48+
!.vscode/extensions.json
49+
50+
### Linux ###
51+
*~
52+
53+
# temporary files which can be created if a process still has a handle open of a deleted file
54+
.fuse_hidden*
55+
56+
# KDE directory preferences
57+
.directory
58+
59+
# Linux trash folder which might appear on any partition or disk
60+
.Trash-*
61+
62+
# .nfs files are created when an open file is removed but is still being accessed
63+
.nfs*
64+
65+
### OSX ###
66+
*.DS_Store
67+
.AppleDouble
68+
.LSOverride
69+
70+
# Icon must end with two \r
71+
Icon
72+
73+
74+
# Thumbnails
75+
._*
76+
77+
# Files that might appear in the root of a volume
78+
.DocumentRevisions-V100
79+
.fseventsd
80+
.Spotlight-V100
81+
.TemporaryItems
82+
.Trashes
83+
.VolumeIcon.icns
84+
.com.apple.timemachine.donotpresent
85+
86+
# Directories potentially created on remote AFP share
87+
.AppleDB
88+
.AppleDesktop
89+
Network Trash Folder
90+
Temporary Items
91+
.apdisk
92+
93+
### Windows ###
94+
# Windows thumbnail cache files
95+
Thumbs.db
96+
ehthumbs.db
97+
ehthumbs_vista.db
98+
99+
# Folder config file
100+
Desktop.ini
101+
102+
# Recycle Bin used on file shares
103+
$RECYCLE.BIN/
104+
105+
# Windows Installer files
106+
*.cab
107+
*.msi
108+
*.msm
109+
*.msp
110+
111+
# Windows shortcuts
112+
*.lnk
113+
114+
# Others
115+
lib/
116+
!.gitignore
117+
!.gitkeep
118+
/data/*
119+
/tmp/
120+
/public/uploads/
121+
rethinkdb_data
122+
.env
123+
/config/local.json

human-connection-api/.istanbul.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
verbose: false
2+
instrumentation:
3+
root: ./
4+
reporting:
5+
print: summary
6+
reports:
7+
- html
8+
- text
9+
- lcov
10+
watermarks:
11+
statements: [70, 90]
12+
lines: [70, 90]
13+
functions: [70, 90]
14+
branches: [70, 90]

human-connection-api/.npmignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Directory for instrumented libs generated by jscoverage/JSCover
11+
lib-cov
12+
13+
# Coverage directory used by tools like istanbul
14+
coverage
15+
16+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17+
.grunt
18+
19+
# Compiled binary addons (http://nodejs.org/api/addons.html)
20+
build/Release
21+
22+
# Dependency directory
23+
# Commenting this out is preferred by some people, see
24+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
25+
node_modules
26+
27+
# Users Environment Variables
28+
.lock-wscript
29+
30+
data/

human-connection-api/.travis.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
language: node_js
2+
node_js:
3+
- "8"
4+
cache:
5+
yarn: true
6+
directories:
7+
- node_modules
8+
services:
9+
# we need docker for building the image and mongo for testing
10+
- docker
11+
- mongodb
12+
install:
13+
# nothing!
14+
15+
jobs:
16+
include:
17+
- stage: Prepare Cache
18+
script: true
19+
- stage: Build and Test
20+
script:
21+
- docker build -t humanconnection/api-feathers:alpha .
22+
- script:
23+
- cp ./config/local.example.json ./config/local.json
24+
- yarn install --frozen-lockfile --non-interactive
25+
- yarn add codacy-coverage
26+
- rm -Rf tmp
27+
- yarn eslint
28+
- NODE_ENV=test istanbul cover ./node_modules/mocha/bin/_mocha -- test/ --timeout=10000 --exit
29+
- cat ./coverage/lcov.info | codacy-coverage
30+
- rm ./config/local.json
31+
32+
after_success:
33+
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then
34+
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
35+
docker push humanconnection/api-feathers:alpha;
36+
fi

human-connection-api/Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM node:8.9-alpine
2+
LABEL Description="This image is used to start the hc-api-feathers" Vendor="Human-Connection gGmbH" Version="1.0" Maintainer="Human-Connection gGmbH ([email protected])"
3+
4+
# update unix packages
5+
RUN apk update && apk upgrade
6+
RUN rm -rf /var/cache/apk/*
7+
8+
# expose the app port
9+
EXPOSE 3030
10+
11+
# set environment variables
12+
# ENV NPM_CONFIG_PRODUCTION=false
13+
# ENV HOST=0.0.0.0
14+
ENV NODE_ENV=production
15+
ENV API_PORT=3030
16+
17+
# start the application in a autohealing cluster
18+
#CMD NODE_ENV=production pm2 start server/index.js -n api -i 0 --attach
19+
# as we have issues with pm2 currently in conjunction with nuxt, we use the standard approach here
20+
CMD NODE_ENV=production node server/index.js
21+
22+
# create working directory
23+
RUN mkdir -p /var/www/
24+
WORKDIR /var/www/
25+
26+
# install app dependencies
27+
COPY package.json /var/www/
28+
COPY yarn.lock /var/www/
29+
RUN yarn install --frozen-lockfile --non-interactive
30+
31+
# copy the code to the docker image
32+
COPY . /var/www/

0 commit comments

Comments
 (0)