How do I configure a remix so my users can get started in one click?
Remix URLs have the following format:
https://glitch.com/edit/#!/remix/project-name
You can populate the values in a project's .env
file on remix. This can be used to automatically set up a project with a user's API keys already in it.
There are two options:
1: URL
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...
2: Programmatically
Or POST
to https://api.glitch.com/projects/<project-name>/remix
, sending a JSON body like:
{
env: {
var1: "value1",
var2: "value2"
}
}
It will return:
{
id: project.id,
domain: project.domain,
inviteToken: project.invite_token,
joinLink: joinLink
}