Skip to content

Commit

Permalink
Merge pull request #52 from witheve/add/npminstall
Browse files Browse the repository at this point in the history
Update installation docs with npm instructions
  • Loading branch information
cmontella authored Dec 13, 2016
2 parents 8144f7f + 6f9faa1 commit 0890d83
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 9 deletions.
3 changes: 2 additions & 1 deletion handbook/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ docker pull witheve/eve
```

Windows Users - Docker for Windows requires Microsoft Hyper-V, which requires Windows 10.

## Examples

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

## See also

[linux](../linux) | [mac](../mac) | [windows](../windows) | [running](../running)
[linux](../linux) | [mac](../mac) | [windows](../windows) | [npm](../npm) |[running](../running)
11 changes: 10 additions & 1 deletion handbook/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ title: "Getting Eve"
weight: 1
---

# Getting Eve

There are four ways to get Eve:

1. Try Eve online, in your browser at [play.witheve.com](play.witheve.com).
2. Download the Eve package through [npm](../npm).
3. Download the Eve [Docker container](../docker).
4. Download and run Eve from source. We have instructions available for [linux](../linux), [mac](../mac), and [windows](../windows).

## See Also

[linux](../linux) | [mac](../mac) | [windows](../windows) | [running](../running)
[linux](../linux) | [mac](../mac) | [windows](../windows) | [docker](../docker) | [npm](../npm) | [running](../running)
2 changes: 1 addition & 1 deletion handbook/mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Then open `http://localhost:8080/` in your browser.

## See also

[linux](../linux) | [windows](../windows) | [docker](../docker) | [running](../running)
[linux](../linux) | [windows](../windows) | [docker](../docker) | [npm](../npm) | [running](../running)
21 changes: 21 additions & 0 deletions handbook/npm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
menu:
main:
parent: "Getting Eve"
title: "npm"
weight: 5
---

# Eve on npm

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:

```
npm install -g witheve
```

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

## See also

[linux](../linux) | [mac](../mac) | [windows](../windows) | [docker](../docker) | [running](../running)
57 changes: 52 additions & 5 deletions handbook/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,65 @@ weight: 2

# Running Eve

In the extract Eve directory, Running
If you've downloaded and installed Eve via [npm](../npm), you can launch Eve with the `eve` command.

```
npm start
eve
```

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.

## Running an Eve File

If you want to run a specific Eve program, you can provide its path after the `eve` command:

```
eve ~/myDir/myEveFile.eve
```

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:

```
eve ~/myEveDir/myEveFile.eve --editor
```

This will run the supplied Eve program with the editor visible

## Running Eve in Server mode

Eve can be started in server mode using the `--server` flag:

```
eve --server
```

Then direct your browser to `http://localhost:8080`
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


## Eve Workspaces

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.

## Flags

- server - run Eve in server execution mode
- server - run Eve in server execution mode.
- editor - run Eve with the editor visible. This defaults to false, except when Eve is started in an Eve project folder.
- 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.

## Running Eve from Source

To run Eve from source, you invoke the following command in the extracted Eve folder:

```
npm start
```

You can apply the above flags to this command, but you'll need an extra `--` to do so. e.g.

```
npm start -- --port 1234
```

## See Also

[linux](../linux) | [mac](../mac) | [windows](../windows) | [docker](../docker)
[linux](../linux) | [mac](../mac) | [windows](../windows) | [docker](../docker) | [npm](../npm)
2 changes: 1 addition & 1 deletion handbook/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Then open `http://localhost:8080/` in your browser.

## See also

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

0 comments on commit 0890d83

Please sign in to comment.