Skip to content

Host the data-browser assets / JS bundles #185

@joepio

Description

@joepio

Currenlty, atomic-server depends on GitHub Pages for serving the front-end, because this line is present in the .html:

  <script src="https://joepio.github.io/atomic-data-browser/dist/index.js" type="module"></script>

The advantage of this is that I can update the version for all servers, and possibly fix things that are broken.

The downsides:

  • Depends on me not breaking things (especially for older server versions!)
  • Depends on Github not being down
  • Depends on having a working internet connection (which Atomic-Server actually doesn't require - as long as all resources are already present in the store)

So I want to include these files, ideally in the single executable Rust binary.
But how? The source code is in another repository, and the build process is separate.

Ideas:

Fetch them as part of compilation, make a bunch of Actix endpoints

  • Lots of seperate files, duplicate code

I could add a script that runs yarn build from atomic-data-browser and then copies all the files to the atomic-server/static/browser folder. This folder can then be hosted using actix-web-static-files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions