initial commit

This commit is contained in:
Greg Johnson
2025-08-05 15:03:49 +10:00
parent e4ab08b1ff
commit 7581b6b8c2
15 changed files with 689 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
# build harmony-api
FROM jonmaddox/harmony-api as harmony
FROM node:20.19.3 as node
RUN mkdir -p /app
COPY --from=harmony /usr/src/app /app
WORKDIR /app
RUN /bin/rm -rf node_modules
RUN apt-get -y update && apt-get -y install npm
RUN npm install
COPY config/config.json /config/config.json
ENV CONFIG_DIR /config
EXPOSE 8282
CMD [ "npm", "start" ]

View File

@@ -0,0 +1,11 @@
{
"enableHTTPserver": true,
"mqtt_host": "mqtt://127.0.0.1",
"topic_namespace": "harmony-api",
"mqtt_options": {
"port": 1883,
"username": "someuser",
"password": "somepassword",
"rejectUnauthorized": false
}
}

View File

@@ -0,0 +1,26 @@
{
"name": "harmony-api",
"version": "2.3.5",
"description": "A simple server providing a RESTful and MQTT based service for controlling and monitoring Harmony Hubs.",
"scripts": {
"start": "node app.js"
},
"repository": {
"type": "git",
"url": "https://github.com/maddox/harmony-api"
},
"author": "Jon Maddox <jon@jonmaddox.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/maddox/harmony-api/issues"
},
"dependencies": {
"express": "^4.12.4",
"morgan": "^1.6.1",
"body-parser": "^1.12.4",
"harmonyhubjs-client": "^1.1.0",
"harmonyhubjs-discover": "^1.0.2",
"parameterize": "^0.0.7",
"mqtt": "^1.4.1"
}
}