File size: 401 Bytes
c043cd2
 
767607b
58ce1ab
7485493
 
 
 
 
767607b
 
 
 
 
 
c043cd2
dd7e01c
c043cd2
 
 
 
 
 
 
 
 
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
import subprocess

res = subprocess.run(
    ["npm", "install", "express", "socket.io", "axios"],
    capture_output=True,
    text=True
)


print("Output:")
print(res.stdout)

print("Errors (if any):")
print(res.stderr)

result = subprocess.run(
    ["node", "index.js"],
    capture_output=True,
    text=True
)

print("Output:")
print(result.stdout)

print("Errors (if any):")
print(result.stderr)