Skip to content

Commit

Permalink
Revert "la til botleneck"
Browse files Browse the repository at this point in the history
This reverts commit a2cb44e.
  • Loading branch information
eilifjohansen committed May 26, 2024
1 parent a2cb44e commit a377564
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
11 changes: 4 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ const axios = require('axios');
const cors = require("cors");
const {config} = require("./config/config");
let app = express();
const Bottleneck = require('bottleneck');
const limiter = new Bottleneck({
minTime: 1000 // 1 request per second
});

app.use(cors())

Expand Down Expand Up @@ -59,10 +55,11 @@ app.get('/amplitude/100000244/api/*', (req, res) => {

// Amplitude Prosjekt: MEMU - prod
app.get('/amplitude/100002286/api/*', (req, res) => {
const requestUrl = req.url.replace(/\/amplitude\/100002286/, '')
const authToken = process.env.AMPLITUDE_100002286
limiter.schedule(() => amplitudeProxy(authToken, requestUrl, res))
const requestUrl = req.url.replace(/\/amplitude\/100002286/, '')
const authToken = process.env.AMPLITUDE_100002286
amplitudeProxy(authToken, requestUrl, res)
});

// Amplitude Prosjekt: Aksel - prod
app.get('/amplitude/100002016/api/*', (req, res) => {
const requestUrl = req.url.replace(/\/amplitude\/100002016/, '')
Expand Down
6 changes: 0 additions & 6 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 @@ -19,7 +19,6 @@
"license": "MIT",
"dependencies": {
"axios": "^1.7.2",
"bottleneck": "^2.19.5",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.19.2"
Expand Down

0 comments on commit a377564

Please sign in to comment.