Hi, I have deployed my backend server on a differe...
# prefect-server
r
Hi, I have deployed my backend server on a different location. How can I register a flow using the url for that server? i need to flow.register('project name', 'in remote server)
n
HI @rafaqat ali - you can change the default endpoint for flow registration using this:
Copy code
[server]
endpoint = "YOUR_MACHINES_PUBLIC_IP:4200/graphql"
r
Where I have to change this? I'm using django project and in that project, i'm registering my flow.
while my server is running on a remote machine like http://ip:port/graphql
n
You'll need to change that on your local machine or wherever you're registering flows
In
~/.prefect/config.toml
r
What if, I deploy this code on azure app service? then where I'll change this variable?
I'm new to this tech that's why don't have much idea about it
I have find the way: We can set global end point like below
Copy code
os.environ["PREFECT__CLOUD__API"]="server url"
n
@rafaqat ali - the only places you need to set that variable are the machine from which you're registering your flows (where you're calling
flow.register
) and where you start your agent 🙂