PirateBox in Node.js

Posted by crypto.scythe 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
PirateBox in Node.js
April 12, 2011 01:10PM
Hello!

I am new to this community and as I am really fascinated by your Idea and as a student in interactive media design I instantly fell for the concept ^_^

As I didn't get it right to work on my little Sharp Muramasa Subnotebook under FreeBSD I tried to re-implement the PirateBox serving script as a single Node.js script. Currently it works very well and is with only the chat function missing and it does not start on system startup (anyone could help me with rc.d on FreeBSD?)

It would be great if you guys could take a look at it and give me some opinions as this is my first try on Node.js

Here is a photo of my sweet working Muramasa


Here you can download the script: [sites.google.com]

I released the script itself under the MIT License, I hope that is okay with you David as I packed in the two PirateBox logos in the zip file.

If there is interest I could write a short tutorial on how I got the PirateBox setup for my Notebook and FreeBSD.
Re: PirateBox in Node.js
April 12, 2011 05:18PM
You created a javascript, which works like a web-server? eye popping smiley
How does this work?
Re: PirateBox in Node.js
April 12, 2011 05:24PM
crypto.scythe Wrote:
>
> I released the script itself under the MIT
> License, I hope that is okay with you David as I
> packed in the two PirateBox logos in the zip
> file.

No problem - thanks for asking.

> If there is interest I could write a short
> tutorial on how I got the PirateBox setup for my
> Notebook and FreeBSD.

This sounds great - please do write up a tutorial!
Re: PirateBox in Node.js
April 12, 2011 06:20PM
Matthias Wrote:
-------------------------------------------------------
> You created a javascript, which works like a
> web-server? eye popping smiley
> How does this work?

It's done by Node.js a server-side implementation of JavaScript using Google's V8 JavaScript Engine which is heavily event oriented. By this I think it is very suitable for specific things like this lightweight PirateBox server ^_^

darts Wrote:
-------------------------------------------------------
> crypto.scythe Wrote:
> >
> > I released the script itself under the MIT
> > License, I hope that is okay with you David as
> I
> > packed in the two PirateBox logos in the zip
> > file.
>
> No problem - thanks for asking.
> > If there is interest I could write a short
> > tutorial on how I got the PirateBox setup for
> my
> > Notebook and FreeBSD.
>
> This sounds great - please do write up a tutorial!

Okay I will try to cover all I did to get this thing running with FreeBSD smiling smiley
Re: PirateBox in Node.js
April 12, 2011 06:55PM
crypto.scythe Wrote:
-------------------------------------------------------

> It's done by Node.js a server-side implementation
> of JavaScript using Google's V8 JavaScript Engine
> which is heavily event oriented. By this I think
> it is very suitable for specific things like this
> lightweight PirateBox server ^_^
>


Thanks! Interesting thing ... thumbs up
Re: PirateBox in Node.js
April 24, 2011 09:08AM
Okay, so here are the installation instructions for my script, next step will be creating instructions for setting up FreeBSD in piratebox fashion.

installation instructions:
(these are for FreeBSD but should be easily adaptable to other unixoid OSes)

1. install Node.js, you can find it in ports/www/node
compile it with "make install clean"

2. install Node Package Manager from www.npmjs.org
the easiest ways is:
Language: PHP
curl http://npmjs.org/install.sh | sh

3. install the needed Node.js packages
"npm install formidable"
"npm install mime"
"npm install url"
"npm install forever"

4. move piratebox.js and its folders to where you want it
go the the folder you extracted it
"mkdir /var/piratebox"
"mv * /var/piratebox"

5. configure the piratebox script to use the folders you have chosen
open the piratebox.js in your favorite plaintext editor and change the values of
"pbUPLOADDIRECTORY" and "pbWEBROOT" to the folders you created.

6. now you can start the piratebox
to start it normal: "node piratebox.js"
to start it with automatic restarting: "forever piratebox.js"

7. The piratebox should run now at port 80
check the piratebox.js file for more configuration options



Edited 1 time(s). Last edit at 04/24/2011 02:39PM by darts.
Re: PirateBox in Node.js
September 21, 2015 10:18AM
Hello
The link is dead :
https://sites.google.com/site/sites/system/errors/WebspaceNotFound?path=%2Fpirateboxnodejsserver%2Fhome%2Fpiratebox.zip
I think I find it here:
https://github.com/crypto-scythe/piratebox
I have a library box with a tiddly. Somebody try on it ?
I working around node js to allow people to upload=stream images and chat=live localy
This seem to be a good aproch.
Sorry for my aproximativ english winking smiley
*Vincent-bonnefille