Skip to content

EnricoPicci/mobile-object-observables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mobile Object Server, Controller and Monitor

This is the code that implements what has been described in this article

https://medium.com/@enrico.piccinin/reactive-thinking-how-to-design-a-distributed-system-with-rxjs-websockets-and-node-57d772f89260

Server

The MobileObjectServer implementation can be found in the server directory

MobileObject

The MobileObject implementation is part of the Server implementation and can be found in the server/src/mobile-object directory

The logic implemented by the MobileObject is described here https://medium.freecodecamp.org/thinking-reactively-how-to-animate-with-movement-objects-using-rxjs-692518b6f2ac

Monitor and Controller

Monitor and Controller are Angular web applications whose code can be found in the directories monitor-app and controller-app

Installation

  • Clone the repository
  • Execute npm install from within server, monitor-app and controller-app directories
  • From within server directory launch the command node ./dist/index
  • From within monitor-app directory launch the command ng serve --port 4010 (feel free to choose any port, this command just launches the development server of Angular)
  • From within controller-app directory launch the command ng serve --port 4011 (feel free to choose any port, this command just launches the development server of Angular)
  • Open a browser window and request the url localhost:4010 - this opens a Monitor
  • Open a second browser window and request the url localhost:4011 - this opens a Controller
  • As soon as you open the Controller you should see on the Monitor a small car which represents the MobileObject created by opening a Controller
  • Turn on the MobileObject clicking the green button on the Controller
  • Now you can move the MobileObject clicking on the different arrows present in the Controller

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published