Skip to content

Commit

Permalink
Merge pull request #25 from afuh/develop
Browse files Browse the repository at this point in the history
Remove apicache dependency in favor of nginx
  • Loading branch information
Axel committed May 23, 2018
2 parents cbc6e92 + 2766998 commit 50f673c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 14 deletions.
5 changes: 0 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"author": "Axel Fuhrmann",
"license": "BSD-3-Clause",
"dependencies": {
"apicache": "^1.2.1",
"dotenv": "^5.0.1",
"express": "^4.16.3",
"express-brute": "^1.0.1",
Expand Down
5 changes: 1 addition & 4 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ const bodyParser = require('body-parser')
const path = require('path')
const morgan = require('morgan')

const apicache = require('apicache')
const { middleware: cache } = apicache

const app = express()

const api = require('./routes/api')
Expand Down Expand Up @@ -39,7 +36,7 @@ app.use(bodyParser.urlencoded({ extended: true }))
app.use(bodyParser.json())

app.get('/', (req, res) => res.redirect('/api'))
app.use('/api', cache('5 minutes'), api)
app.use('/api', api)

app.use(errors.notFound)
app.use(errors.productionErrors)
Expand Down
4 changes: 0 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ anymatch@^2.0.0:
micromatch "^3.1.4"
normalize-path "^2.1.1"

apicache@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/apicache/-/apicache-1.2.1.tgz#765cec58aae5f48a9c71007d035f4110aa6fbeaf"

append-transform@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991"
Expand Down

0 comments on commit 50f673c

Please sign in to comment.