Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Bump eslint from 8.55.0 to 9.1.1 #435

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ARG BUILDPLATFORM=${BUILDPLATFORM:-amd64}
FROM --platform=${BUILDPLATFORM} node:18-bullseye-slim AS flagon-node

WORKDIR /app
RUN --mount=type=bind,target=./package.json,src=./package.json \
--mount=type=bind,target=./package-lock.json,src=./package-lock.json \
npm ci
COPY ./src src/
COPY ./example example/

EXPOSE 8000

CMD ["node", "example/server.js"]
5 changes: 5 additions & 0 deletions example/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ app.get('/', function (req, res) {

app.post('/', function (req, res) {
const body = typeof req.body === "string" ? JSON.parse(req.body) : req.body

const isEmptyArray = (Array.isArray(body) && body.length === 0);
const isEmptyObject = (typeof body === 'object' && body !== null && Object.keys(body).length === 0);
if (isEmptyArray || isEmptyObject) return

console.log(body)

let delimiter = ',\n\t';
Expand Down
Loading
Loading