You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A package for Eve is available on [npm](https://www.npmjs.com/package/witheve). After [installing npm](https://nodejs.org/en/download/) for your platform, you can download our package with the following command:
12
+
13
+
```
14
+
npm install -g witheve
15
+
```
16
+
17
+
This will give you a global Eve installation that you can invoke with the command `eve` from any folder. Doing so will launch an Eve server at `http://localhost:8080`.
Copy file name to clipboardExpand all lines: handbook/running.md
+52-5Lines changed: 52 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,18 +8,65 @@ weight: 2
8
8
9
9
# Running Eve
10
10
11
-
In the extract Eve directory, Running
11
+
If you've downloaded and installed Eve via [npm](../npm), you can launch Eve with the `eve` command.
12
12
13
13
```
14
-
npm start
14
+
eve
15
+
```
16
+
17
+
This launches an Eve server running in the Eve root directory at `http://localhost:8080`. From here, you'll be directed to `quickstart.eve`, and have access to the Eve examples directory from within the editor.
18
+
19
+
## Running an Eve File
20
+
21
+
If you want to run a specific Eve program, you can provide its path after the `eve` command:
22
+
23
+
```
24
+
eve ~/myDir/myEveFile.eve
25
+
```
26
+
27
+
Then you navigate to Eve in your browser to access the specified program. If you like, you can also recover the editor with a flag:
28
+
29
+
```
30
+
eve ~/myEveDir/myEveFile.eve --editor
31
+
```
32
+
33
+
This will run the supplied Eve program with the editor visible
34
+
35
+
## Running Eve in Server mode
36
+
37
+
Eve can be started in server mode using the `--server` flag:
38
+
39
+
```
40
+
eve --server
15
41
```
16
42
17
-
Then direct your browser to `http://localhost:8080`
43
+
Without this flag, execution of Eve programs happens within the browser, with the Eve server acting only as a file server between the browser and your local system. In server mode, Eve will instead execute your program on the server. Currently written programs will operate exactly as before, but this is a preliminary step in order to get networked Eve applications going (like a chat server or a multiplayer game). There is still work needed to be done there
44
+
45
+
46
+
## Eve Workspaces
47
+
48
+
You can run Eve in a custom workspace. To create a new Eve workspace, create a folder with an empty file named `package.json`, then start Eve from within this folder. Eve recognizes that it is starting an Eve workspace, and will serve `*.eve` files from within this directory instead of the Eve examples folder. Furthermore, you can serve various assets, like images or CSS, by placing them in an "assets" sub-folder.
18
49
19
50
## Flags
20
51
21
-
- server - run Eve in server execution mode
52
+
- server - run Eve in server execution mode.
53
+
- editor - run Eve with the editor visible. This defaults to false, except when Eve is started in an Eve project folder.
54
+
- port - specify the port on which to run the Eve server. Alternatively, the running port can be specified with the `PORT` environment variable, which takes precedence over the `port` flag.
55
+
56
+
## Running Eve from Source
57
+
58
+
To run Eve from source, you invoke the following command in the extracted Eve folder:
59
+
60
+
```
61
+
npm start
62
+
```
63
+
64
+
You can apply the above flags to this command, but you'll need an extra `--` to do so. e.g.
0 commit comments