Add server, DB, and image processing modules
Introduce initial project scaffold: Express webhook server (server.js) for Immich uploads, DB pool (modules/database.js) using pg, immich repository (repositories/immichRepo.js) with get/update functions, image processing via sharp (modules/image_processor.js), a small execution helper (modules/execution_helper.js), and package.json + package-lock. Server validates a bearer token, filters non-image assets, waits briefly, compresses the image and updates DB path. Requires env vars: DB_HOST, DB_USER, DB_PORT, DB_NAME, DB_PASS, PASS_CODE, IMMICH_DATA_PATH, IMG_COMPRESSION_OUTPUT_FORMAT, IMG_COMPRESSION_OUTPUT_QUALITY, PORT.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "immich-photo-compressor",
|
||||
"version": "0.0.1-alpha",
|
||||
"description": "a webhook tool to compress file post uploaded on immich",
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"email": "gilleslazure04@gmail.com",
|
||||
"name": "azures04",
|
||||
"url": "https://azures.fr"
|
||||
},
|
||||
"type": "module",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"test": "node"
|
||||
},
|
||||
"dependencies": {
|
||||
"dotenv": "^17.4.2",
|
||||
"express": "^5.2.1",
|
||||
"nodemon": "^3.1.14",
|
||||
"pg": "^8.23.0",
|
||||
"sharp": "^0.35.4"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user