38 lines
899 B
Plaintext
38 lines
899 B
Plaintext
put files into webserver-directory.
|
|
|
|
install nodejs package
|
|
install nodejs-legacy package
|
|
install npm package
|
|
[sudo] npm -g install forever
|
|
|
|
npm install autosize
|
|
ln -s node_modules/autosize/dist/autosize.min.js
|
|
|
|
|
|
|
|
copy files to some directory (/var/local/nodejs/wc/) and make sure permissions are good
|
|
in the directory get the Q-library for promises:
|
|
cd /var/loca/nodejs/wc && npm install q
|
|
|
|
configure a process to keep running node.js with the server.js:
|
|
---------------------------------------------------------------
|
|
[edit] /etc/rd.local:
|
|
su - <user> -c "cd /var/local/nodejs/wc; /usr/local/bin/forever start server.js"
|
|
|
|
|
|
Configure Lighttpd:
|
|
-------------------
|
|
cd /etc/lighttps/conf-enabled
|
|
ln -s ../conf-available/10-proxy.conf
|
|
|
|
add to 10-proxy.conf:
|
|
|
|
$HTTP["url"] =~ "^/wc/.*$" {
|
|
proxy.server = ( "" =>
|
|
(( "host" => "127.0.0.1", "port" => 8000 ))
|
|
)
|
|
}
|
|
|
|
|
|
re-start lighttpd
|