Skip to content

Commit 00a9c7f

Browse files
committed
Restructure: separate pi-specific apps and added localhost server.
All apps have moved to /coder-apps/platform/[appname] and some crude scripts have been added to make moving files between coder-base and the coder-apps structure a bit easier.
1 parent 742b043 commit 00a9c7f

File tree

106 files changed

+3364
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+3364
-7
lines changed

INSTALL

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
2+
CODER FOR RASPBERRY PI
3+
The easy way...
4+
5+
Coder for Raspberry Pi is distributed as a Pi SD Card image.
6+
If you want to go the easy route, please check out the
7+
documentation at http://goo.gl/coder
8+
9+
10+
11+
EVERYONE ELSE
12+
13+
If you want to install Coder on something else, or would
14+
like to install it on an existing Raspberry Pi, you can
15+
manually install it as well.
16+
17+
BEFORE YOU START:
18+
I recommend you do this as a normal user and not root.
19+
The official pi distro has a "coder" user that Coder runs
20+
under, and ports 80 and 433 are forwarded to 8080/8081.
21+
22+
MANUAL INSTALL:
23+
24+
1. You need to have node.js and npm installed
25+
26+
2. Download Coder from git.
27+
# git clone https://github.com/googlecreativelab/coder.git
28+
29+
3. In coder-base run "npm install" to download all the
30+
needed modules.
31+
32+
4. Install the basic Coder apps.
33+
# cd coder-apps
34+
# ./install_common.sh
35+
36+
5. Edit config.js to your liking. I recommend starting
37+
with the settings in config.js.localhost and running
38+
the localhost server.
39+
40+
6. Start Coder
41+
# cd coder-base
42+
# node localserver.js
43+
44+
45+
If you want to run Coder on an external port, you'll need
46+
to run server.js instead of localserver.js. This requires
47+
a bit of port forwarding setup in iptables. Look in
48+
the raspbian-addons directory to see the customizations that
49+
were made to the stock raspbian distro.
50+
51+
The raspberry pi version of Coder has some other
52+
tweaks that allow you to change your wifi settings
53+
and keep your Pi password in sync with your Coder password.
54+
There's some convoluted system configuration involved, which is
55+
probably why you'd want to start with the Coder disk image,
56+
but the modified apps are available by running ./install_pi.sh
57+
after step 4. Modifications to the stock raspbian configuration
58+
can be found in raspbian-addons.
59+
60+
61+

coder-apps/archive_app.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
##
4+
## Copies an application from the coder-base working directory to
5+
## the coder-apps directory.
6+
##
7+
## sh archive_app appname base_path apps_path
8+
##
9+
## Eg.
10+
## sh archive_app hello_coder ../coder-base/ ./common/
11+
12+
if [ $# != 3 ]
13+
then
14+
echo -e "\nUse:\narchive_app appname base_path apps_path\n"
15+
exit
16+
fi
17+
18+
app=$1
19+
base=$2
20+
dest=$3
21+
22+
mkdir "$dest/$app"
23+
mkdir "$dest/$app/app"
24+
mkdir "$dest/$app/static"
25+
mkdir "$dest/$app/static/js"
26+
mkdir "$dest/$app/static/css"
27+
mkdir "$dest/$app/static/media"
28+
mkdir "$dest/$app/views"
29+
touch "$dest/$app/static/media/.gitignore"
30+
31+
cp $base/apps/$app/* $dest/$app/app/
32+
cp $base/views/apps/$app/* $dest/$app/views/
33+
cp $base/static/apps/$app/js/* $dest/$app/static/js/
34+
cp $base/static/apps/$app/css/* $dest/$app/static/css/
35+
cp $base/static/apps/$app/media/* $dest/$app/static/media/

0 commit comments

Comments
 (0)