From 3e5a541528035dd46f89586ed78d00ddaccd1969 Mon Sep 17 00:00:00 2001 From: cmontella Date: Wed, 7 Dec 2016 16:06:54 -0800 Subject: [PATCH 1/3] Update installation with npm --- handbook/docker.md | 3 ++- handbook/mac.md | 2 +- handbook/npm.md | 21 +++++++++++++++++ handbook/running.md | 57 +++++++++++++++++++++++++++++++++++++++++---- handbook/windows.md | 2 +- 5 files changed, 77 insertions(+), 8 deletions(-) create mode 100644 handbook/npm.md diff --git a/handbook/docker.md b/handbook/docker.md index b6b6c94..9ccb7a7 100644 --- a/handbook/docker.md +++ b/handbook/docker.md @@ -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: @@ -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) \ No newline at end of file +[linux](../linux) | [mac](../mac) | [windows](../windows) | [npm](../npm) |[running](../running) \ No newline at end of file diff --git a/handbook/mac.md b/handbook/mac.md index d7baa91..3fbdecd 100644 --- a/handbook/mac.md +++ b/handbook/mac.md @@ -18,4 +18,4 @@ Then open `http://localhost:8080/` in your browser. ## See also -[linux](../linux) | [windows](../windows) | [docker](../docker) | [running](../running) \ No newline at end of file +[linux](../linux) | [windows](../windows) | [docker](../docker) | [npm](../npm) | [running](../running) \ No newline at end of file diff --git a/handbook/npm.md b/handbook/npm.md new file mode 100644 index 0000000..254683c --- /dev/null +++ b/handbook/npm.md @@ -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) \ No newline at end of file diff --git a/handbook/running.md b/handbook/running.md index dd5abec..255cab3 100644 --- a/handbook/running.md +++ b/handbook/running.md @@ -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 Serve 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 as an intermediary 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) \ No newline at end of file +[linux](../linux) | [mac](../mac) | [windows](../windows) | [docker](../docker) | [npm](../npm) \ No newline at end of file diff --git a/handbook/windows.md b/handbook/windows.md index effefc4..785f902 100644 --- a/handbook/windows.md +++ b/handbook/windows.md @@ -18,4 +18,4 @@ Then open `http://localhost:8080/` in your browser. ## See also -[linux](../linux) | [mac](../mac) | [docker](../docker) | [running](../running) \ No newline at end of file +[linux](../linux) | [mac](../mac) | [docker](../docker) | [npm](../npm) | [running](../running) \ No newline at end of file From a3d645f37ff2fc1cb97016c658368b5d749b44b8 Mon Sep 17 00:00:00 2001 From: cmontella Date: Wed, 7 Dec 2016 16:54:20 -0800 Subject: [PATCH 2/3] Update installtion root --- handbook/installation.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/handbook/installation.md b/handbook/installation.md index 8020342..770c315 100644 --- a/handbook/installation.md +++ b/handbook/installation.md @@ -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) From 6f9faa1bd2fdeff2091e05fd4c617d923a0c5c89 Mon Sep 17 00:00:00 2001 From: cmontella Date: Mon, 12 Dec 2016 16:50:44 -0800 Subject: [PATCH 3/3] Make suggested changes --- handbook/running.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handbook/running.md b/handbook/running.md index 255cab3..58e559f 100644 --- a/handbook/running.md +++ b/handbook/running.md @@ -32,7 +32,7 @@ eve ~/myEveDir/myEveFile.eve --editor This will run the supplied Eve program with the editor visible -## Running Eve in Serve mode +## Running Eve in Server mode Eve can be started in server mode using the `--server` flag: @@ -40,7 +40,7 @@ Eve can be started in server mode using the `--server` flag: eve --server ``` -Without this flag, execution of Eve programs happens within the browser, with the Eve server acting as an intermediary 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 +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