Unable to run auspice client side code


I am trying to run auspice client side code into django application (which has its own server). Here are steps I used for that.

  1. I cloned auspice repo from github
  2. Installed package.json dependencies by running “npm install” command
  3. Ran build script by running following command: “npm run-script build”
  4. Which generated “dist” folder which has all client side code (minified JavaScript and other files of auspice app).
  5. Copied all those files from “dist” folder to appropriate django file structure location.
  6. Ran django application

And I got following JavaScript error on page:

http://server-location:7955/charon/getAvailable?prefix=/ 404 (Not Found)

I know that there is detailed document which mentions about auspice servers but still not sure, how I can fix this error. Is there anyway I can avoid writing my own server side code ?Or Can I just return 204 response (minimal server side code) , by writing server side code in django application but not more server side code ? Because I saw here you are doing similar thing : github.com/nextstrain/auspice.us/blob/master/server/handlers.js

Also, do you know in django application, where should I put my data files, so that it can load correctly when it runs auspice client JavaScript files ? Do you know in django file structure exactly where I need to put those data files ? If data files are huge, then how can I load those huge data files remotely (like loading from remote server) ?

Thank You.

The datasets are not bundled in the auspice code (i.e. the code in dist/), so the auspice client makes API requests to /charon/getDataset & /charon/getAvailable in order to get the dataset information to visualise.

While I can’t help with django specific questions (perhaps others here can), if you are maintaining your own server, you’ll have to write handlers for the API calls the auspice client will make. This is documented at Server API — Auspice documentation.