We have prepared some samples for you that show the different uses of a Sequence. Some are super simple, some are a little more advanced. They show the use of data from various resources, such as local disk, external API, or plain keyboard input. The samples are differentiated according to language in which they were written. Every sample contains a short readme with a guidance describing the procedure for running the example as well as is linked to its source code on GitHub. Please take a look at our samples and if you have any questions or difficulties, feel free to ask us on Discord.
The execution will be performed from the command line using our CLI, which full description and documentation you will find in CLI Reference.
In samples we are using methods and definitions described in API Reference.
Sample execution requires prior environment preparation and installations.
You can run each sample either on your Self Hosted Hub or Scramjet Cloud Platform. Choose the most suitable for you and follow the link that provides installation tips and guidelines:
Samples execution will be performed from the command line using our CLI, which full description you will find in our official documentation website in CLI Reference section, or run si --help
command where you have everything in a nutshell.
You can install the si
command from npm using the following command:
npm i -g @scramjet/cli
Please clone our GitHub platform-samples repository:
git clone https://github.com/scramjetorg/platform-samples.git
Python packages work in a similar way to all the others. They need to pack the dependencies and carry over anything they may need to run the program. They also need a package.json
file.
JavaScript packages are pretty straight forward in use. After the dependency installation is performed inside the Sequence package it is ready to be compressed and sent to STH.
TypeScript compiles to JavaScript. It means that TypeScript packages except dependency installation also need to be compiled. We added a build
and postbuild
scripts to every package.json
in TypeScript packages, which are responsible for compiling files into a dist
folder and coping package.json
file into the dist
folder. In effect, it is the dist
folder, that becomes the Sequence package, ready to be compressed and sent to STH.