penguin-beta-version-1.5 #3

Merged
anonpenguin merged 30 commits from sotiris-beta-version-1.5 into main 2025-07-05 02:53:30 +00:00
3 changed files with 25 additions and 9 deletions
Showing only changes of commit b0a68b19c9 - Show all commits

View File

@ -1,13 +1,17 @@
# Blog API Node
FROM node:18-alpine
# Install system dependencies
# Install system dependencies including build tools for native modules
RUN apk add --no-cache \
curl \
python3 \
make \
g++ \
git
git \
cmake \
pkgconfig \
libc6-compat \
linux-headers
# Create app directory
WORKDIR /app
@ -19,7 +23,7 @@ COPY package*.json pnpm-lock.yaml ./
RUN npm install -g pnpm
# Install full dependencies and reflect-metadata
RUN pnpm install --frozen-lockfile --ignore-scripts \
RUN pnpm install --frozen-lockfile \
&& pnpm add reflect-metadata @babel/runtime
# Install tsx globally for running TypeScript files (better ESM support)

View File

@ -1,5 +1,17 @@
#!/usr/bin/env node
// Polyfill CustomEvent for Node.js environment
if (typeof globalThis.CustomEvent === 'undefined') {
globalThis.CustomEvent = class CustomEvent<T = any> extends Event {
detail: T;
constructor(type: string, eventInitDict?: CustomEventInit<T>) {
super(type, eventInitDict);
this.detail = eventInitDict?.detail;
}
} as any;
}
import express from 'express';
import { DebrosFramework } from '../../../../src/framework/DebrosFramework';
import { User, UserProfile, Category, Post, Comment } from '../models/BlogModels';

View File

@ -33,13 +33,13 @@ services:
environment:
- NODE_ID=blog-node-1
- NODE_PORT=3000
- IPFS_PORT=4001
- IPFS_PORT=4011
- BOOTSTRAP_PEER=blog-bootstrap
- SWARM_KEY_FILE=/data/swarm.key
- NODE_ENV=test
ports:
- "3001:3000"
- "4011:4001"
- "4011:4011"
volumes:
- ./swarm.key:/data/swarm.key:ro
- blog-node-1-data:/data
@ -63,13 +63,13 @@ services:
environment:
- NODE_ID=blog-node-2
- NODE_PORT=3000
- IPFS_PORT=4001
- IPFS_PORT=4012
- BOOTSTRAP_PEER=blog-bootstrap
- SWARM_KEY_FILE=/data/swarm.key
- NODE_ENV=test
ports:
- "3002:3000"
- "4012:4001"
- "4012:4012"
volumes:
- ./swarm.key:/data/swarm.key:ro
- blog-node-2-data:/data
@ -93,13 +93,13 @@ services:
environment:
- NODE_ID=blog-node-3
- NODE_PORT=3000
- IPFS_PORT=4001
- IPFS_PORT=4013
- BOOTSTRAP_PEER=blog-bootstrap
- SWARM_KEY_FILE=/data/swarm.key
- NODE_ENV=test
ports:
- "3003:3000"
- "4013:4001"
- "4013:4013"
volumes:
- ./swarm.key:/data/swarm.key:ro
- blog-node-3-data:/data