1
1
---
2
- title : Local Development
2
+ title : Developing scripts locally
3
3
---
4
4
5
- # Local Development
5
+ # Developing scripts locally
6
6
7
7
## Deno
8
8
@@ -45,12 +45,12 @@ For example to retrieve resources.
45
45
46
46
To do so you will need to fill out the context variables that will otherwise be
47
47
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,
49
49
for example ` https://app.windmill.dev ` , note that you can never include a
50
50
trailing ` / ` , or the client will fail to connect. Then set ` WM_TOKEN ` to a
51
51
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.
54
54
55
55
### Terminal
56
56
@@ -65,6 +65,7 @@ For example:
65
65
``` cmd
66
66
set "BASE_INTERNAL_URL=https://app.windmill.dev"
67
67
set "WM_TOKEN=ThisIsAToken"
68
+ set "WM_WORKSPACE=workspace_id"
68
69
```
69
70
70
71
then simply run the relevant command for your language.
@@ -101,7 +102,8 @@ For example, for deno:
101
102
"runtimeArgs" : [" run" , " --inspect-brk" , " -A" , " ${file}" ],
102
103
" env" {
103
104
"BASE_INTERNAL_URL" : " https://app.windmill.dev" ,
104
- "WM_TOKEN" : " ThisIsAToken"
105
+ "WM_TOKEN" : " ThisIsAToken" ,
106
+ "WM_WORKSPACE" : " workspace_id"
105
107
},
106
108
"envFile" : " .env"
107
109
}
@@ -121,10 +123,23 @@ and add two lines
121
123
```
122
124
BASE_INTERNAL_URL = https://app.windmill.dev
123
125
WM_TOKEN = ThisIsAToken
126
+ WM_WORKSPACE= workspace_id
124
127
```
125
128
126
129
::: caution
127
130
128
131
Make sure you are not checking your Token into git.
129
132
130
133
:::
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
+ ```
0 commit comments