Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

JavaScript is coded as an interpreted language. This means that it is not compiled in advance like RPG, C++, or Java. The  The source code file and the executable file are one and the same. 

Whenever Node.js modules are used, however, Node automatically caches them for performance. When a module is cached, it doesn't have to be read from disk again and reinterpreted.

With traditional Node.js applications, cached modules are not reloaded until the node process is restarted. This means a server instance would have to be ended and started up again in order to incorporate changes to your applications.

...

To reload these files without needing to open and then save them in the IDE, we added two routes that can be accessed via a POST webservice call to reload these files.  They The routes are /reloadAPI and /reloadWorkspaces respectfully.:

  •  

...

  • /reloadAPI

...

  • will reload all API files not located in

...

  • Workspaces

  •  /reloadWorkspaces 

...

  • will reload all files in

...

  • Workspaces, including API files

...

  • .

Note: a workspace is a folder in the modules/ directory that has a hidden, .noderun/ directory and inside there, a settings.json file containing at least the following:

Code Block
{
  "description": "",
  "current git repository": "",
  "git repositories": [""],
}

Therefore, if developers are copying Workspace files between different installations of Profound.js, then the .noderun/directory and the settings.json file also must be copied. Without the .noderun/settings.json file, Profound.js does not consider a folder as a Workspace even if files were originally copied from a Workspace. Consequently, /reloadWorkspaces would not detect new APIs in that folder because the folder is not a Workspace.

Request Parameters and Security

Both of these routes take a POST request with no parameters, and are protected with basic authentication.  Both routes respond with a simple {"success": true} object, regardless if any API files or Workspaces were updated or not. 

...