hydra-synth / hydra

Livecoding networked visuals in the browser

Home Page:https://hydra.ojack.xyz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

configurable server settings

micuat opened this issue · comments

It would be great to have settings.json or some sort to configure server settings (especially for build/bundle specific settings), for example, set custom shortcut key bindings for the editor.

Also I'm testing Chevereto for image upload instead of twitter and it would be great if these settings can be also set in json (I'm not sure if it should coexist with .env for credentials or move everything to json. however note that if the credentials are included you cannot require("../settings.json") as browserify will include the entire json into the bundle)

If we do so, it should be excluded from the repo and instead make settings.json.template. It may make sense to do the same for default sketches (examples.json as examples.json.template) so that those who want to self host won't be bothered by git.

note: there should be hydra-server/uploads/.gitkeep or something in the repo as a placeholder for file upload

note:

      const upload = multer({ storage });
      app.post("/image", upload.single('previewImage'), (req, res) => {
        console.log('UPLOADING TO CHEVERETO');
        superagent
          .post(APIURL)
          .field('key', APIKEY)
          .attach('source', 'hydra-server/uploads/blob.png', {filename: req.query.sketch_id})
          .end((err, res) => {
            if (err) {
              console.log(err)
            } else {
              console.log('Media uploaded!')
            }
             });
      });

it would be nice to add this and switchable with twitter with eg settings.json

ohhhh I hadn't heard of chevereto....interesting!

I would definitely like to switch to a chevereto uploader (or similar) as the twitter bot is no longer working.

Agree with everything listed here! will look at the draft pull request listed above.

we could think about using the budget to rent a server and setup an image hosting (or use your server)

Yes! I am currently using a digital ocean droplet with the most basic configuration to host this repo.
We could increase the storage and have hydra editor and chevereto on the same droplet, or have them on separate droplets.