petkov / http_to_mqtt

HTTP to MQTT bridge
89 stars 64 forks source link

Setup on own server #1

Closed lesjaw closed 7 years ago

lesjaw commented 7 years ago

hello.. a very nice app of you..

I have test the app and its so awesome bro.. can you make a tutorial step to deply in our own server rather then heroku?

petkov commented 7 years ago

Sorry, I really don't understand what do you mean. What is own server?

lesjaw commented 7 years ago

I mean deploy your app in our own server, not free public server like heroku, let said I have server running Ubuntu somewhere and I can access it from anywhere... Sorry for my bad language..

What dependencies will I need to deploy your apps... Thanks

BrettSheleski commented 7 years ago

@lesjaw , the process should be the same as any decent node.js project. Assuming you already have git, node, and npm running on your server, you should be able to do the following:

# clone the repository
git clone https://github.com/petkov/http_to_mqtt.git
# go to the created directory
cd http_to_mqtt
# install needed dependencies
npm install
# run the app
node index.js

This will run http_to_mqtt listening on TCP port 5000 and will attempt to connect to the MQTT broker on localhost. You can change any of these settings using environment variables, or just modify the code to what you want.

Node app is running on port 5000
lesjaw commented 7 years ago

Awesome... Thank you...