Parser examples on Ubuntu - RopleyIT/GLRParser GitHub Wiki
-
Ensure the .NET Core SDK has been installed on Ubuntu.
-
Clone the github repository to a development folder on your Ubuntu machine.
-
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. -
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
, orTrafficLightControllerExample/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'sbin/Release/netcoreapp3.1/publish
folder. -
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 namedCalculatorDemoApp
,SentenceParserDemo
orPedXDemo
. Note that as this is not Windows, none of them has a.exe
filename extension. -
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 yourappsettings.json file
. If so, modify the URL above accordingly. -
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.