-
Notifications
You must be signed in to change notification settings - Fork 1
Home
- Back-end: rethinkDB (realtime database JSON-based)
- Middle-tier: node.js + Horizon (expose a websocket API to front-end application)
- Front-end: Javascript + HTML
- Memory: minimum 2 Go (ref: https://rethinkdb.com/docs/memory-usage/)
**(optionally - if you are planning on installing in virtual machine, I recommend VMware Workstation Player)
Install OS : https://ubuntu.com/download/server
Install rethinkDB : https://rethinkdb.com/docs/install/ubuntu/
Install node.js : https://github.com/nodesource/distributions/blob/master/README.md#debinstall
Install Horizon : sudo npm install -g horizon
**(optionally - if you are planning on running over a port under 1024, like 80 or 443, run "sudo setcap cap_net_bind_service=+ep readlink -f \
which node``")
Copy files : download the files of a version directory from https://github.com/lucienhetu/my-mind?files=1 to your local system
Start the server : "cd" to the folder where the files were downloaded, then run "hz serve"
Install node.js : If you are here, you know how.
Install RethinkDB: Download the installation package for Windows (an non-official of 2.4 is available at https://github.com/srh/rethinkdb/releases/download/v2.4.0-srh-win-1/rethinkdb-v2.4.0-srh-win-1-Release_x64.zip), go through all the questions of the wizard. Once the installation is complete, move rethinkdb.exe under c:\Windows.
Install Horizon using node.js
- Open a command line and run "npm install -g horizon"
Testing everything is working
- Create a folder: c:\path_to_your_project_directory
- Create a basic horizon project
- open a command line
- cd to the folder hosting the folder previously created (cd c:\path_to_your_project)
- deploy a basic project
- run "hz init _directory", _directory being the folder previously created
- Start the server
- open a command line
- cd to the folder hosting the folder previously created (cd c:\path_to_your_project)
- run "hz serve _directory --dev" (note: some instructions will appear)
-Open a browser and navigate to http://127.0.0.1/8181, a scrolling message will/should appear.
everything is working? Well celebrate, then delete everything under _directory, copy all files from https://github.com/lucienhetu/my-mind?files=1 to _directory, run "hz serve _directory", the browse and navigate to http://127.0.0.1:8181/?id=nodes
- A bit of this : https://auth0.com/docs/connections/identity-providers-social
- A bit of that : config.toml & secret.toml
BD
- Follow the instructions here
Web
- Add the following to /etc/rc.local
#!/bin/bash
/sbin/runuser insertUserNameHere -s /bin/bash -c "hz serve /home/insertUserNameHere"
exit 0
- Run
sudo chmod +x /etc/rc.local
Debug notes
Symptom: page never stop loading
Diagnostic:
- press X to stop webpage loading,
- open web console, the follwing msg is displayed :Loading failed for the <script> with source “https://192.168.207.129/horizon/horizon.js”.
Solution:
- stop hz process
- run rethinkdb
- run hz serve --start-rethinkdb no
REFERENCES
- Horizon : https://github.com/rethinkdb/horizon-docs
- Horizon > CLI : http://web.archive.org/web/20171116120650/http://horizon.io/docs/cli/
- RethinkDB : https://rethinkdb.com/docs/ & https://githublists.com/lists/d3viant0ne/awesome-rethinkdb & https://www.packtpub.com/big-data-and-business-intelligence/getting-started-rethinkdb
Note to self: add instruction for OSes other than windows - https://rethinkdb.com/docs/install/, ...)