Skip to content

Commit

Permalink
ft(table):integrate the requests table in the backend
Browse files Browse the repository at this point in the history
Added the request table and router setup in preparation for allowing users create and retrieve travel requests.

[Finishes #167727463]
  • Loading branch information
parkerthegeniuschild committed Aug 27, 2019
1 parent 1a1020e commit 905e2db
Show file tree
Hide file tree
Showing 30 changed files with 1,245 additions and 472 deletions.
4 changes: 2 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
{
"presets": ["@babel/preset-env"]
}
}
21 changes: 16 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,28 @@
# Please take note that the dummy values below will not work.
# They are just to show you what yours shoud look like.

DB_URI_DEVELOPMENT="https://devwebsite.com"
NODE_ENV=development

DB_DIALECT=postgres

DB_STRING_DEVELOPMENT=dev://dev:devpasswd:5555/
DB_HOST_DEVELOPMENT=localhost
DB_NAME_DEVELOPMENT=db_dev
DB_USER_DEVELOPMENT=devUser
DB_PASSWORD_DEVELOPMENT=devPassword

DB_URI_STAGING="https://stagingWebsite.com"
DB_STRING_STAGING=staging://staginguser:stagingpasswd:5432/
DB_HOST_STAGING=127.0.0.1
DB_NAME_STAGING=db_staging
DB_USER_STAGING=stagingUser
DB_PASSWORD_STAGING=stagingUser

DB_URI_TEST="https://prodwebsite.com"
DB_USER_TEST=prodUser
DB_PASSWORD_TEST=prodPassword
DB_STRING_PRODUCTION="prod://produser:prodpasswd:3306/"
DB_HOST_PRODUCTION=localhost
DB_NAME_PRODUCTION=db_prod
DB_USER_PRODUCTION=stagingUser
DB_PASSWORD_PRODUCTION=stagingUser


.................
.................
Expand Down
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
src/test
.gitignore
HISTORY.txt
README.txt
node_modules/
.env
app.js
.idea/
dist/
17 changes: 14 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,33 @@
"node": true,
"es6": true,
"mocha": true,
"amd": true
"commonjs": true
},
"parserOptions": {
"sourceType": "module"
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"parser": "babel-eslint",
"plugins": [
"flowtype"
],
"rules": {
"one-var": 0,
"camelcase": 0,
"no-process-env": 0,
"one-var-declaration-per-line": 0,
"import/no-dynamic-require": 0,
"new-cap": 0,
"consistent-return": 0,
"no-param-reassign": 0,
"comma-dangle": 0,
"curly": ["error", "multi-line"],
"no-undef": "off",
"import/no-unresolved": [2, { "commonjs": true }],
"no-shadow": ["error", { "allow": ["req", "res", "err"] }],
"no-shadow": ["off", { "allow": ["req", "res", "err"] }],
"valid-jsdoc": [
"error",
{
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

### Node ###
# Logs
logs
*.log
src/logs/app.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
Expand Down
2 changes: 1 addition & 1 deletion .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"spec": "src/test"
"spec": "src/test"
}
17 changes: 8 additions & 9 deletions .nycrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"nyc": {
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": true,
"reporter": "lcov",
"report-dir": "./coverage",
"exclude": [
"src/index.js"
"nyc": {
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": true,
"reporter": "lcov",
"report-dir": "./coverage",
"exclude": [
"src/index.js"
]
}
}
}

11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js

node_js:
- "v10.15.3"
- 10.15.3

cache:
directories:
Expand All @@ -14,11 +14,14 @@ services:
- postgresql

before_script:
- psql -c "CREATE DATABASE testing_db;" -U postgres
- psql -c "CREATE DATABASE barefootNomad_db;" -U postgres
- psql -c "ALTER ROLE postgres PASSWORD 'postgres';" -U postgres
- touch src/logs/app.log

script:
- npm run db:migrate
- npm test
after_success:
- npm run coverage

after_success:
- npm run coverage
- npm run undo:migration
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM alpine:3.10.1
WORKDIR /app
COPY package*.json ./
RUN apk add --update nodejs npm python
RUN apk add --update alpine-sdk nodejs npm python
RUN LD_LIBRARY_PATH=/usr/local/lib64/:$LD_LIBRARY_PATH && export LD_LIBRARY_PATH && npm ci
COPY . .
RUN npm run clean && npm run build
EXPOSE 3000
CMD ["npm", "run", "start:staging"]
CMD ["npm", "run", "start:dev"]
Loading

0 comments on commit 905e2db

Please sign in to comment.