Skip to content

Instantly share code, notes, and snippets.

@benj02
Created March 30, 2018 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benj02/04eb1b44c8f5cd5557f991188d31f9b2 to your computer and use it in GitHub Desktop.
Save benj02/04eb1b44c8f5cd5557f991188d31f9b2 to your computer and use it in GitHub Desktop.
readme

Josh's Machine Control Panel

Running on windows

First install node.js, get the latest version.

Then, with this folder extracted somewhere convenient (Like C:\), open a command prompt window in the folder. Then enter the following commands:

npm install
npm run build

This will build the project and install all the packages it uses.

To run the server right out of the command window, do:

node server.js

Configuring

Configuration is done through the file server_config.json, its default contents are reproduced here:

{
  "port": 8081,
  "mode": "testing",
  "macrofile": {
    "testing": "./testfile",
    "production": "<-- PATH TO PROGRAM ON DATASERVER GOES HERE -->"
  },
  "header": "Example Header (change me in config.json)"
}

Options:

  • port: The port to run the server on. Default 8081
  • mode: Whether to run in testing or production mode. The only thing this changes is which file it writes to
  • macrofile: Specifies which file to write to
  • header: The text to show at the top of the page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment