Skip to content

Commit 038fc10

Browse files
committed
developing scripts locally
1 parent 72e7e40 commit 038fc10

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

docs/advanced/4_local_development/index.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Local Development
2+
title: Developing scripts locally
33
---
44

5-
# Local Development
5+
# Developing scripts locally
66

77
## Deno
88

@@ -45,12 +45,12 @@ For example to retrieve resources.
4545

4646
To do so you will need to fill out the context variables that will otherwise be
4747
filled out by the windmill runtime for you. The most important ones are
48-
`WM_TOKEN` and `BASE_INTERNAL_URL`. Set `BASE_INTERNAL_URL` to the URL of you windmill instance,
48+
`WM_TOKEN`, `WM_WORKSPACE` and `BASE_INTERNAL_URL`. Set `BASE_INTERNAL_URL` to the URL of you windmill instance,
4949
for example `https://app.windmill.dev`, note that you can never include a
5050
trailing `/`, or the client will fail to connect. Then set `WM_TOKEN` to a
5151
token, either create this in the UI, or use [wmill, the CLI](../3_cli/index.md)
52-
using `wmill user create-token`. Below are some examples on how to do this in
53-
various environments.
52+
using `wmill user create-token`. And then `WM_WORKSPACE` corresponds to your workspace id.
53+
Below are some examples on how to do this in various environments.
5454

5555
### Terminal
5656

@@ -65,6 +65,7 @@ For example:
6565
```cmd
6666
set "BASE_INTERNAL_URL=https://app.windmill.dev"
6767
set "WM_TOKEN=ThisIsAToken"
68+
set "WM_WORKSPACE=workspace_id"
6869
```
6970

7071
then simply run the relevant command for your language.
@@ -101,7 +102,8 @@ For example, for deno:
101102
"runtimeArgs": ["run", "--inspect-brk", "-A", "${file}"],
102103
"env" {
103104
"BASE_INTERNAL_URL": "https://app.windmill.dev",
104-
"WM_TOKEN": "ThisIsAToken"
105+
"WM_TOKEN": "ThisIsAToken",
106+
"WM_WORKSPACE": "workspace_id"
105107
},
106108
"envFile": ".env"
107109
}
@@ -121,10 +123,23 @@ and add two lines
121123
```
122124
BASE_INTERNAL_URL = https://app.windmill.dev
123125
WM_TOKEN = ThisIsAToken
126+
WM_WORKSPACE= workspace_id
124127
```
125128

126129
:::caution
127130

128131
Make sure you are not checking your Token into git.
129132

130133
:::
134+
135+
136+
## Pushing your scripts to Windmill
137+
138+
Once you are done developing your script, you can push it to Windmill using the CLI!
139+
140+
Be sure to add wmill to your path after installing.
141+
```
142+
deno install --unstable -A https://deno.land/x/wmill/main.ts
143+
wmill workspace add
144+
wmill sync push
145+
```

src/landing/Hero.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function Hero() {
77
<div className="relative isolate overflow-hidden bg-white">
88
<LandingHeader />
99

10-
<div className="mx-auto max-w-7xl px-6 pt-10 gap-y-8 pb-24 sm:pb-32 lg:flex lg:py-20 lg:px-8 mt-4">
10+
<div className="mx-auto max-w-7xl px-6 pt-4 gap-y-8 pb-24 sm:pb-32 lg:flex lg:pt-10 lg:pb-36 lg:px-8 mt-4">
1111
<div className="mx-auto max-w-2xl lg:mx-0 lg:max-w-xl lg:flex-shrink-0 lg:pt-8">
1212
<div className="h-8">
1313
<GitHubButton

static/videos/main.mp4

-5.41 MB
Binary file not shown.

0 commit comments

Comments
 (0)