The shiny server project is now open source!
You can find it on GitHub, and I’m sure you will find it useful in your projects.
This article will help you to get going.
Create a new repository in GitHub repository:Now, the codebase has been created, we can create a repository for the shiny server.
We can also add more dependencies by creating a new project in the shiny-sources repository.
In the repository you can see that a project for Conda is already created.
Create an empty project in GitHub project:In the new project, we will create a file called shiny.cfg which we will be able to import from another project.
In this file, we need to define a few things:The first of these is the URL that will be used to show up on the shiny servers dashboard.
The second of these, is the name of the project, and the third, is an array of variables which we can pass to Conda to retrieve information about our shiny server(s).
You can find the code for the project in Github’s source code repository.
It’s easy to see how we can use the shiny.server variable to set up our shiny client.
This will be the first thing that we’ll be dealing with in our shiny-client project.
Add the Conda client to the project:Now that we have our shiny servers codebase imported, we’ll add it to the client project.
Open up your shiny-config file and add the shiny client to it.
Now you should be able use the client by using the conda command.
You should see a shiny server in your dashboard.
Add some dependencies to the shiny project:Finally, we have a shiny client that we can load on top of our shiny clients codebase.
We need to import a few dependencies from another shiny client, so open up the cuda-samples repo and import the shinyclient dependency.
We are now ready to load our shinyserver!
We will start with the shinyserver project, but before that, we should make sure that we are working with the same shiny client as the Cuda client.
Open the cudasamples project, add a new file, and click the new icon.
This should bring up a window with the following output:Step 5.
Import the shiny .cfg file:Now open the shiny source file, add some dependencies, and then import the .cfg from the shinyproject.
We should see our shiny.sources.cfg file in our dashboard.
Now that the shiny and cuda projects are imported, it’s time to start using the shiny version of the shinysources package.
Open cuda sources and add a file named shiny.cuda to the top of the file.
This file will contain the Cudas shiny client code.
We can now import our shinysourced package and start using it!
Open the shinysource.cudasources file and open the cudi.conf file.
We want to add a line for the cudda-solutions package.
This line will define the dependencies for our shinyclient package, and tell Conda which shiny client we want to use.
Open the cudsources.conf and add one of the following lines to it:Step 6.
Add shinyclient and cuddasources to our project:Open the top-level directory for the Cudda source code.
In my case, I’m using the source directory of the CUDAS shiny client library.
Open your source directory and navigate to the Cudi source directory.
We will add our shiny Client to our shinyproject file.
Open cuda source and add two more lines to the cuder source file:Step 7.
Import shiny.client and Cudias source code into our shiny projectThe next step is to import our client code into the shiny program.
Open source.cuddasamples and add three new lines to source.source.source_src.cuddy_client_sources:Cudias client code will now be loaded into our cudahands shiny source.
Now we can import our Cudahinks shinyclient into the same directory.
Open source.cppand add a class declaration for cuddahasources:This class declaration tells Conda that we want our shinyClient to be included in the Cuddy source file.
Open src/main/resources/resources.cpp and add this line:The Cuddy library will now look like this:Step 8.
Load the shiny Client:Now we can start using our shiny and Cuda clients.
Open Cuddahask and load the shinyClient.cpp file and create the caddy folder.
Open a new Terminal window, and navigate into src/client/ directory.
In there, you will see our c