Skip to content
/ m-ld-nodejs-starter Public template

Starter project for Node.js using m-ld and Javascript

License

Notifications You must be signed in to change notification settings

m-ld/m-ld-nodejs-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

m-ld Node.js Starter Project

Basic setup for Node.js using m-ld and Javascript.

To run:

  1. npm install
  2. node index.js

The index.js script first runs an MQTT broker to which m-ld clones can connect. In any real scenario this would be a separate, horizontally-scaled service, and other options for peer-to-peer messaging are possible.

The script then runs two clones using the scripts clone1.js and clone2.js. Clone one is the "genesis" clone and then clone two is the first replica (once they are both started then they are equivalent). Both clones enter some data and log the updates that they see and their final state.

You can change the data that is being written or the queries that are run to experiment with different scenarios. Remember you can also use the m-ld playground to experiment with the API.

About

Starter project for Node.js using m-ld and Javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published