A study to implement a real-time communication with Node.js, OrientDB (via Docker), and Socket.io, with the liveQuery() method from OrientDB.
- First, you need to have Node.js v7+, NPM and Docker in your machine.
- Clone this repository
- Create a path in your machine to store the OrientDB databases locally. By default, the directory which will be used is
/opt/orientdb/databases. If you create another directory, change the scriptbuildonpackage.jsonatdocker run -d --name orientdb -p 2424:2424 -p 2480:2480 -v {YOUR_DIRECTORY}:/orientdb/databases ... - Run
npm install - Run
npm run build - Run
npm start - Open
http://localhost:8000
- Once started, open the terminal and a browser at
http://localhost:8000 - Then, run
npm run newusers. You will see the data changing in your page and printing in your console the new records that are saved on your database