Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Latest commit

 

History

History
132 lines (79 loc) · 2.31 KB

HACKING.md

File metadata and controls

132 lines (79 loc) · 2.31 KB

Hacking pahvi

Installation in Ubuntu

Dependencies

sudo apt-get install build-essential libssl-dev git-core graphicsmagick

Fetch and Build Node.js 0.6

wget http://nodejs.org/dist/v0.6.21/node-v0.6.21.tar.gz
tar xzvf node-v0.6.21.tar.gz
cd node-v0.6.21
./configure
make
sudo make install

Fetch and build Redis

wget http://redis.googlecode.com/files/redis-2.4.16.tar.gz
tar xzvf redis-2.4.*.tar.gz
cd redis-2.4.*
make
sudo make install
sudo cp redis.conf /etc/redis.conf

Upstart script /etc/init/redis-server.conf

description "redis server"

start on runlevel [23]
stop on shutdown

exec sudo -u opinsys redis-server /etc/redis.conf >> /var/log/redis.log

respawn

Start it

sudo start redis-server

Fetch and build Pahvi

git clone https://github.com/opinsys/pahvi.git
cd pahvi
npm rebuild

Configuring

Move config.json-example to config.json and edit if necessary.

Running the app

In development

bin/develop

Node.js debugging

bin/debug

Production

export NODE_END=production
npm start

Directory conventions

Server-side code:

lib/

Client-side code:

client/

Client styles:

client/styles/

Vendor bundles for the client (JS and CSS!):

client/vendor/

Handlebars templates:

views/

Client-side Handlebars templates:

views/client

Random helper scripts

bin/

Resources