Skip to content

Commit 2d31afb

Browse files
committed
Remove axios dependency
We can use the Node.js Fetch API directly instead of relying on an external dependency.
1 parent af71c15 commit 2d31afb

File tree

3 files changed

+9
-22
lines changed

3 files changed

+9
-22
lines changed

package-lock.json

Lines changed: 7 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
"@terraformer/wkt": "^2.2.1",
118118
"altcha": "^0.9.0",
119119
"angulartics2": "^12.2.0",
120-
"axios": "^1.11.0",
121120
"bootstrap": "^5.3",
122121
"cerialize": "0.1.18",
123122
"cli-progress": "^3.12.0",

server.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import * as ejs from 'ejs';
2525
import * as compression from 'compression';
2626
import expressStaticGzip from 'express-static-gzip';
2727
/* eslint-enable import/no-namespace */
28-
import axios from 'axios';
2928
import LRU from 'lru-cache';
3029
import { isbot } from 'isbot';
3130
import { createCertificate } from 'pem';
@@ -648,9 +647,9 @@ function isExcludedFromSsr(path: string, excludePathPattern: SsrExcludePatterns[
648647
*/
649648
function healthCheck(req, res) {
650649
const baseUrl = `${REST_BASE_URL}${environment.actuators.endpointPath}`;
651-
axios.get(baseUrl)
650+
fetch(baseUrl)
652651
.then((response) => {
653-
res.status(response.status).send(response.data);
652+
res.status(response.status).send(response);
654653
})
655654
.catch((error) => {
656655
res.status(error.response.status).send({

0 commit comments

Comments
 (0)