Publishing and serving your application's client side assets is the main task Eik was designed for. Given local paths to client side bundle files you produce, Eik will package up the files and upload them to an Eik server where they will be served for use in your production applications.
In your app's Eik config you use the
files key to define a local path or paths to be included when publishing.
eik.json file entrypoints
package.json file entrypoints
The publish command
With entrypoints defined in the Eik config, running the
eik publish command will assemble files (specified by entrypoints) into an archive and upload the archive to the Eik server defined by the
Once uploaded, the archive will be unpacked and the files served at the appropriate paths.
The following example shows how entrypoint definitions correspond to final file locations:
Given the following local files:
And the following eik.json definition:
Or the following package.json definition:
When running the following command:
Then the published URLs will be: