This repository has been archived by the owner on Jul 15, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathINSTALL
47 lines (31 loc) · 2.3 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Most of TeaJS docs are available online, see http://code.google.com/p/teajs/wiki/Manual. This file contains a somewhat obsolete archive version of the said page.
= First steps =
In order to use TeaJS, you first have to get the binary. Windows users can just download a precompiled release [1], Ubuntu users can use a PPA [2]; otherwise one has to compile TeaJS from source. There is a separated wikipage dedicated to compiling TeaJS [3].
When you have a TeaJS working, you might need to setup the configuration file. It needs to be placed to a pre-defined location, which is set at compile time. If unsure, just run `tea` - it will tell you if the configuration file is not at the correct location.
You should check the configuration file and edit it if necessary. The most important value is `require.paths`, which corresponds to the directory in which TeaJS modules are located. *It is not possible to directly modify require.paths property; one must use array methods to modify its contents.*
*Windows users only:* TeaJS requires v8.dll to be present; additional TeaJS modules (most notably PostgreSQL) have more dll dependencies. These files are located in `dll/` subdirectory of Windows distribution, copy them either to system path or to TeaJS directory as necessary.
= Running =
== As a command-line program ==
Syntax (Linux/BSD/MacOS/Posix):
{{{
tea [-c configfile] [-d debugger_port] myscript.js
}}}
Syntax (Windows):
{{{
tea.exe [-c configfile] [-d debugger_port] myscript.js
}}}
If no `-c` option is specified, then the system-wide config file is used. The location for this file is set at compile time. If no system config file exists, TeaJS will refuse to run.
The `-d` options specifies a TCP port for the V8 debugger agent to listen at. If no `-d` option is specified, the debugger agent is disabled.
== As Apache module ==
This is described at separate page [4].
= Additional reading =
* API Documentation [5]
* Short code examples [6]
* Using and creating modules [7]
[1] http://code.google.com/p/teajs/downloads/list
[2] https://launchpad.net/~ondras/+archive/teajs
[3] http://code.google.com/p/teajs/wiki/Manual
[4] http://code.google.com/p/teajs/wiki/ApacheConfiguration
[5] http://code.google.com/p/teajs/wiki/API
[6] http://code.google.com/p/teajs/wiki/CodeSnippets
[7] http://code.google.com/p/teajs/wiki/Modules