Hi guys,
I’ve been playing around with the API and can remix from a project no problems, but does anyone know how to pass env variables when remixing/starting a new project via the API?
Cheers,
J
Hi guys,
I’ve been playing around with the API and can remix from a project no problems, but does anyone know how to pass env variables when remixing/starting a new project via the API?
Cheers,
J
You can populate the values in a project’s .env file on remix. Just pop the variable names and corresponding values on the end of your remix URL, like so:
https://glitch.com/edit/#!/remix/project-name?var1=value1&var2=value2
Awesome, thanks for that Gareth. Slightly different topic, but whats the syntax for a PATCH request to projects/project-name? I wanted to play around with renaming projects
It’s PATCH /projects/, and you include a JSON body with the values you want to change. You want {domain: 'newdomain'}
. It won’t work with the project domain in the URL - you need the UUID for the project.
You can set the env values programmatically: See Programmatically set env file? Per-student setup
However I was unable to remix my project via the API – received an error message. (See the other thread.)