-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.js
35 lines (33 loc) · 895 Bytes
/
start.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const path = require('path');
const { virtual_env, project_dir } = require("./constants");
module.exports = () => {
const config = {
daemon: true,
run: [
{
method: "shell.run",
params: {
venv: path.resolve(__dirname, project_dir, virtual_env),
message: "python st_fix.py",
on: [{ event: "/http:\/\/[0-9.:]+/", done: true }],
},
},
{
method: "shell.run",
params: {
path: project_dir,
venv: path.resolve(__dirname, project_dir, virtual_env),
message: "streamlit run app.py --runner.fastReruns false --server.runOnSave true --server.port 5500",
on: [{ event: "/http:\/\/[0-9.:]+/", done: true }],
},
},
{
method: "local.set",
params: {
url: "{{input.event[0]}}"
}
},
],
};
return config;
};