Full support for workspaces was added in Profound.js 5.0.0.
A workspace is a convenient way of organizing your projects. A workspace is a directory on the file system that includes all of the source code and configuration files needed to make an application work, along with a Git repository for source control. Workspace directories are stored within the 'modules' sub-directory of the Profound.js installation directory. Workspaces from Profound.js can easily be deployed in the cloud on Profound.js Spaces and vice versa.
Use of workspaces in Profound.js is optional, but strongly recommended. On Profound.js Spaces, all applications are organized into workspaces.
To create a new workspace, use the option New→Workspace from the Home section of the ribbon:
Then enter a workspace name and description on the Create Workspace dialog:
The workspace is created and then automatically opened in the IDE.
A workspace has the following directory structure. Note that you'll need to select Show Hidden in order to show all of the contents.
New files and directories can be added to the workspace by using the right-click options on the Files Tree:
Or by using the New File drop down options on the Home section of the ribbon:
And then saving the file into the workspace directory or a sub-directory, by clicking the Save button in the Home section of the ribbon:
When a workspace is open in the IDE, the default save location will be the workspace directory:
To run an application, you must first create one or more callable Profound.js modules. See here for instructions on creating a callable module. Then, you must configure a route (a URL path) that will be used to call the module. To configure routes, right-click on your Profound.js module file or Rich Display JSON file in the Files Tree and select Properties:
On the File Properties dialog, you can configure two different types of routes:
For a stateless Express program, also check the Express Route box and optionally select the desired HTTP method to respond to:
The Files Tree will display an icon next to the file associated with the App Start route, if configured:
The Files Tree will display an icon next to any files associated with a Named Route:
Workspace routes are run using URLs like this:
If an App Start Route is configured, it can be launched in a browser tab by using the option Launch→Launch App in Browser Tab from Home section of the ribbon:
The App Start Route can also be run within the IDE by clicking on Run Your App in the bottom bar to expand it, and then using the Start App button:
Workspaces can be opened by clicking on the Open option on the Home section of the Ribbon:
And then selecting the workspace from the Workspace tab on the Open Dialog:
Workspaces can also be opened using the Spaces List in the bottom bar:
Clicking a workspace name in the list will open it in a new browser tab.
To rename a workspace, use the right-click option in the Files Tree to rename the workspace directory:
To change a workspace description, open the file '.noderun/settings.json' in the workspace directory, and edit the "description" field.
To remove a workspace, click on the minus icon on the Spaces List:
Or use the right-click option in the Files Tree to delete the workspace directory:
Profound.js applications use the Profound UI Rich Display File framework. The following files can be customized in each workspace: