Skip to content

Commit

Permalink
Updates engines (major)
Browse files Browse the repository at this point in the history
  • Loading branch information
zrrrzzt committed Sep 5, 2018
1 parent ca80ae5 commit 911a2a1
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ jspm_packages

# yarn
yarn.lock

# Env
.env

package-lock.json
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js:
- "7"
- "10"
after_success:
- npm run coveralls
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# Setting the base to nodejs 7.10.0
FROM node:7.10.1-alpine@sha256:4954ce53247180e207772f936223b11d52a7e4ee712dfe73fe2a75e39f785067

# Maintainer
MAINTAINER Jonas Enge
FROM node:10.9.0-alpine

# Bundle app source
COPY . /src
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ const logger = require('./lib/logger')
const validateJwt = require('./lib/validate-jwt')

module.exports = async (req, response) => {
const {query} = await parse(req.url, true)
const { query } = await parse(req.url, true)
let data = ['POST', 'PUT'].includes(req.method) ? await json(req) : query

if (['POST'].includes(req.method)) {
const jwt = req.headers.authorization
const decoded = await validateJwt({jwt: jwt, tokenKey: config.JWT_SECRET})
const decoded = await validateJwt({ jwt: jwt, tokenKey: config.JWT_SECRET })

if (decoded) {
logger('info', ['Validated jwt'])
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
],
"main": "index.js",
"engines": {
"node": ">=7.10.0"
"node": ">=10.9.0"
},
"scripts": {
"test": "standard && nsp check && ava",
"test-offline": "standard && ava",
"coverage": "nyc ava",
"coveralls": "nyc ava && nyc report --reporter=lcov && cat coverage/lcov.info | coveralls",
"setup": "npm install",
"standard-fix": "standard --fix",
"start": "micro",
"now-deploy": "npm test && now --npm -E demo.env && now alias"
"now-deploy": "npm test && now --npm -E demo.env && now alias",
"refresh": "rm -rf node_modules && rm package-lock.json && npm install"
},
"keywords": [
"microservice",
Expand Down Expand Up @@ -64,7 +64,7 @@
"marked": "0.5.0",
"micro": "9.3.3",
"node-dsf": "3.0.17",
"winston": "3.0.0-rc6",
"winston": "2.4.4",
"winston-papertrail": "1.0.5"
}
}
}
3 changes: 2 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"automerge": true
},
"assignees": [
"maccyber"
"maccyber",
"zrrrzzt"
]
}

0 comments on commit 911a2a1

Please sign in to comment.