jpick (owner)

Forks

Revisions

gist: 140235 Download_button fork
public
Public Clone URL: git://gist.github.com/140235.git
Embed All Files: show embed
running more than one rsp at a time on OSX #
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Here's an example of how I was able to use the rsp from Smart.app to run on a different
port at the same time. It would be nice if this ability was built into the GUI app, but
for now, I hacked it.
 
I made a directory for my app here:
 
/Users/jim/joyent/rsp/local-smartasks
 
I put the application source in a subdirectory called '127.0.0.1'. So the bootstrap.js is
at /Users/jim/joyent/rsp/local-smartasks/127.0.0.1/js/bootstrap.js
 
I also made a 'data' subdirectory for the runtime data.
 
There are two more files shown below, so the directory looks like this:
 
jim-picks-macbook-air-2:~/joyent/rsp/local-smartasks$ ls -al
total 16
drwxr-xr-x 6 jim staff 204 3 Jul 10:15 .
drwxr-xr-x 17 jim staff 578 1 Jul 16:30 ..
-rw-r--r-- 1 jim staff 1005 1 Jul 17:32 .rsp.conf
drwxr-xr-x 6 jim staff 204 1 Jul 16:30 127.0.0.1
drwxr-xr-x 3 jim staff 102 1 Jul 17:31 data
-rwxr-xr-x 1 jim staff 88 1 Jul 17:03 run-smart.sh
 
The run-smart.sh script:
 
--- cut here ---
#! /bin/sh
 
HOME=`pwd` /Applications/Smart.app/Contents/Resources/Image/bin/rspd `pwd`
--- cut here ---
 
The .rsp.conf file, with modified paths and port number:
 
--- cut here ---
root=/Applications/Smart.app/Contents/Resources/Image
extensions=Console,DataStore,FileSystem,HTTP,Image,Import,JSONEncoder,OpenId,Sprintf,UUID,Digest,MediaStore
 
[rsp]
hostroot=/Users/jim/joyent/rsp/local-smartasks
oplimit=100000
storage=storage:local
memcached=127.0.0.1:11211
 
[mojo]
hostmapper=hostname
port=8081
 
[host:127.0.0.1]
noconsumption=true
 
[host:localhost]
alternate=127.0.0.1
 
[localstorage]
#data=data
#data=data2
data=/Users/jim/joyent/rsp/local-smartasks/data
 
## The following are storage configurations.
## They both configure storage extensions, where the cluster implementation is different from
## local configuration. It makes the extension list a little more straightforward. One of
## these is referenced by the "storage" configuration option in the rsp group.
[storage:local]
DataStore=SQLite
MediaStore=Local
 
[storage:localdb]
DataStore=SQLite
MediaStore=MogileFS
 
[storage:clusterdb]
DataStore=MySQL
MediaStore=Local
 
[storage:cluster]
DataStore=MySQL
MediaStore=MogileFS
--- cut here ---
 
Just do './run-smart.sh' to run, and Ctrl-C to kill.