Skip to content

Commit bd45703

Browse files
committed
change readme
1 parent 28f4d5a commit bd45703

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
A simple and secure Code-Execution-Engine in Javascript.
66

7-
❗This package is not secure by default. Visit [Security](#security) for production projects❗
7+
❗This package is not secure by default. Visit [Security](#security) for production projects.
88

99
## Table of Contents
1010

@@ -16,6 +16,8 @@ A simple and secure Code-Execution-Engine in Javascript.
1616

1717
[Security](#security)
1818

19+
[LXC](#lxc)
20+
1921
[Contributing](#contributing)
2022

2123
[License](#license)
@@ -66,19 +68,40 @@ const cee = require("code-execution-engine");
6668

6769
const options = {
6870
security: {
69-
enabled: true, // defaults to false
70-
uselxc: true, // enhanced security, but you need to install it first
71+
useLXC: true, // defaults to false
7172
timeout: 10, // 10 seconds timeout
7273
},
7374
};
7475

7576
cee.execute("print('Hi!')", cee.languages.PYTHON3, options);
7677
```
7778

78-
#### LXC
79+
In order to use useLXC, follow the instructions below to setup LXC.
80+
81+
<a name="lxc"/>
82+
83+
## LXC
7984

8085
LXC are Linux containers, that run the code in a different and secure environment. To use them, you need to install them first. LXC are only available on Linux-Systems.
8186

87+
### Installation
88+
89+
```sh
90+
$ sudo apt-get install lxc
91+
```
92+
93+
Create the Linux-Container
94+
95+
```sh
96+
$ lxc-create -t download -n cee
97+
```
98+
99+
Start the created container
100+
101+
```sh
102+
$ lxc-start -n cee -d
103+
```
104+
82105
<a name="contributing"/>
83106

84107
## Contributing

0 commit comments

Comments
 (0)