Created
June 28, 2017 14:17
-
-
Save urcoilbisurco/a66bb1946a2ec40a3200d10cdc1f7a08 to your computer and use it in GitHub Desktop.
Aurora Tips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All the steps are really easy and you can find lots of guides on Internet. | |
Server | |
- install node on server (normally it's already installed, if not just follow this guide) | |
https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04 | |
- install mongodb | |
https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04 | |
- install git on server | |
https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-16-04 | |
- install forever | |
npm install forever -g | |
- check if mongo is already started | |
- 'git clone https://github.com/urcoilbisurco/Aurora-Server' , it will create a 'Aurora-Server' folder. Better if you rename it in something else, like 'aurora' | |
- go inside that folder (cd aurora) | |
- npm install (it will takes a while) | |
- create a _env.js file, with this inside: | |
module.exports={ | |
port:3456, //CHANGE IF YOU WANT | |
production:true, | |
auth:{ | |
saltRounds:10, | |
}, | |
socket_server:"http://localhost:3456", //CHANGE with the same value as 'port' | |
mongo:"mongodb://localhost:27017/aurora", //this is the default port of mongodb, change it if you change the mongo port | |
mqtt_server:"mqtt://localhost:1883", //CHANGE IF YOU WANT | |
weather:{ | |
token:"YOUR TOKEN HERE, | |
location:"YOUR LOCATION HERE", | |
}, | |
broker:{ | |
mongo_url:"mongodb://localhost:27017/", //AS ABOVE | |
port:1883 | |
} | |
} | |
Change the parts that are in capslock, for the weather i'm currently using darksky.net, you need to create an account and retrieve the token | |
- npm run build | |
- forever start index.js | |
Ok, now you need to try to go to YOUR_IP_ADDRESS:PORT, where YOUR_IP_ADDRESS is the ip address of your server and the PORT is the one that you setup on the _env.js file. You should see a "register" page. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment