A Node.js server for sharing interior designs between players.
- Main Project:
/SmallSpacesProject/- Azure DevOps repository with Unreal Engine files - Server Only:
/SmallSpacesProject/server/- Separate GitHub repository connected to Railway
For deployment changes:
- Navigate to
server/directory:cd server/ - Make changes to server files (server.js, package.json, etc.)
- Commit in the server directory:
git add . && git commit -m "Your message" - Push to GitHub:
git push origin main - Railway automatically deploys from the GitHub repository
DO NOT try to push the entire Unreal project - only work within the /server/ directory for deployment changes.
-
Install Node.js (if not already installed):
- Download from https://nodejs.org/
-
Install dependencies:
cd server npm install -
Start the server:
npm start
The server will run on http://localhost:3000
POST /api/designs- Upload a new designGET /api/designs?page=0&pageSize=10- Browse designsPOST /api/designs/:id/download- Download a design (increments counter)POST /api/designs/:id/like- Like/unlike a design (send{"increment": 1}for like,{"increment": -1}for unlike)GET /api/thumbnails/:filename- Get design thumbnailGET /api/health- Health check
- Design files:
storage/designs/ - Thumbnails:
storage/thumbnails/ - Metadata:
storage/metadata.json
- File-based storage (no database required)
- Automatic download counting
- Image compression: Thumbnails automatically resized to 400px width and compressed to JPEG (80% quality)
- Compression logging to monitor bandwidth savings
- CORS enabled for local development
- Large file support (50MB limit)