Parser Examples on Ubuntu - RopleyIT/GLRParser GitHub Wiki

Running the parser examples on Ubuntu

  1. Ensure the .NET Core SDK has been installed on Ubuntu.

  2. Clone the github repository to a development folder on your Ubuntu machine.

  3. Build the projects by changing to the root folder of the app and typing the command dotnet build. This finds the .SLN file, and builds each project in it.

  4. Unfortunately, the static content for the three Blazor examples will not be loaded correctly if you just try to launch the apps at this point. We need to publish the content to a suitable web folder. Publish the content of your application (any of the three folders CalculaterExample/CalculatorDemoApp, SentenceParserExample/SentenceParserDemo, or TrafficLightControllerExample/PedXDemo) by changing to their folders, and typing the command:

    sudo dotnet publish -o (OutputFolder) -c Release

    where (OutputFolder) is a folder selected by you to host your published application. You only need the 'sudo' if you do not have owner rights to create files and folders at your chosen location. If you don't provide the -o option and its output folder, the web content will be saved into the project's bin/Release/netcoreapp3.1/publish folder.

  5. To run your application, change directory to (OutputFolder) and type the name of the executable to launch it. If you are running one of the three examples, your executable will be named CalculatorDemoApp, SentenceParserDemo or PedXDemo. Note that as this is not Windows, none of them has a .exe filename extension.

  6. Navigate to http://localhost:5000/ on your browser to launch the client side of the application. Port 5000 is the default port number used by the Blazor project template, but you may have changed this to a different port number in your appsettings.json file. If so, modify the URL above accordingly.

  7. Don't forget to stop your application in the terminal window when you have finished running the program. Otherwise your next publish command will fail until you do.

The next thing you may wish to do is to install and run NGINX as a reverse proxy web server, so that your .NET Core application can be seen from other machines on the network. Instructions on how to do this come next.