Skip to content

Commit 0890d83

Browse files
authored
Merge pull request #52 from witheve/add/npminstall
Update installation docs with npm instructions
2 parents 8144f7f + 6f9faa1 commit 0890d83

File tree

6 files changed

+87
-9
lines changed

6 files changed

+87
-9
lines changed

handbook/docker.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ docker pull witheve/eve
1515
```
1616

1717
Windows Users - Docker for Windows requires Microsoft Hyper-V, which requires Windows 10.
18+
1819
## Examples
1920

2021
To run the Docker container, execute:
@@ -35,4 +36,4 @@ To pass Eve files on your local machine into the container, you'll need to mount
3536

3637
## See also
3738

38-
[linux](../linux) | [mac](../mac) | [windows](../windows) | [running](../running)
39+
[linux](../linux) | [mac](../mac) | [windows](../windows) | [npm](../npm) |[running](../running)

handbook/installation.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ title: "Getting Eve"
66
weight: 1
77
---
88

9+
# Getting Eve
10+
11+
There are four ways to get Eve:
12+
13+
1. Try Eve online, in your browser at [play.witheve.com](play.witheve.com).
14+
2. Download the Eve package through [npm](../npm).
15+
3. Download the Eve [Docker container](../docker).
16+
4. Download and run Eve from source. We have instructions available for [linux](../linux), [mac](../mac), and [windows](../windows).
17+
918
## See Also
1019

11-
[linux](../linux) | [mac](../mac) | [windows](../windows) | [running](../running)
20+
[linux](../linux) | [mac](../mac) | [windows](../windows) | [docker](../docker) | [npm](../npm) | [running](../running)

handbook/mac.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ Then open `http://localhost:8080/` in your browser.
1818

1919
## See also
2020

21-
[linux](../linux) | [windows](../windows) | [docker](../docker) | [running](../running)
21+
[linux](../linux) | [windows](../windows) | [docker](../docker) | [npm](../npm) | [running](../running)

handbook/npm.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
menu:
3+
main:
4+
parent: "Getting Eve"
5+
title: "npm"
6+
weight: 5
7+
---
8+
9+
# Eve on npm
10+
11+
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`.
18+
19+
## See also
20+
21+
[linux](../linux) | [mac](../mac) | [windows](../windows) | [docker](../docker) | [running](../running)

handbook/running.md

Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,65 @@ weight: 2
88

99
# Running Eve
1010

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.
1212

1313
```
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
1541
```
1642

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.
1849

1950
## Flags
2051

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.
65+
66+
```
67+
npm start -- --port 1234
68+
```
2269

2370
## See Also
2471

25-
[linux](../linux) | [mac](../mac) | [windows](../windows) | [docker](../docker)
72+
[linux](../linux) | [mac](../mac) | [windows](../windows) | [docker](../docker) | [npm](../npm)

handbook/windows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ Then open `http://localhost:8080/` in your browser.
1818

1919
## See also
2020

21-
[linux](../linux) | [mac](../mac) | [docker](../docker) | [running](../running)
21+
[linux](../linux) | [mac](../mac) | [docker](../docker) | [npm](../npm) | [running](../running)

0 commit comments

Comments
 (0)