Skip to content

Files

Latest commit

10bde86 · Mar 9, 2023

History

History

Code from chapter 7

Code organization, per directory

How to run

The Domain IDE

To run the Domain IDE:

$ node init/install-example-DSL-content.js
$ parcel frontend/index.html &
$ node backend/server.js

The steps above achieve the following:

  1. Construct an AST for the example DSL contents, serialize it, and persist the serialized JSON to the backend's storage. That is located in backend/data/.
  2. Bundle the frontend, to dist/, in hot-reloading mode.
  3. Start the backend (an Express server), serving the contents, as well as the frontend from dist/.

The Domain IDE can now be accessed on http://localhost:8080/. Note: the first step initializes the file backend/data/contents.json, without making a backup if it already exists! Alternatively, run:

$ ./initialize-storage.sh
$ ./run-Domain-IDE.sh

The latter script relies on an open command that opens a browser on HTML files.