Building jsbin #265

Closed
hsablonniere opened this Issue Jul 26, 2012 · 10 comments

Comments

Projects
None yet
3 participants

The NPM install is missing a lot of stuffs and doesn't work directly (https://github.com/remy/jsbin/blob/master/docs/running-you-own-jsbin.md).

So I downloaded the project and did a node install in the root project dir.
After that I did a node ..

A lot of stuff works, server is started, serves the files... But I have two errors that prevent me from code casting :

  • In editing mode, I got err19 constraint error with sqlite and so I can't POST code, I get a 500 :-(
  • In watch mode, chrome gives me that : EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.. Firefox doesn't work either.

Any ideas?

Owner

remy commented Jul 26, 2012

Ideas are that it was pushed to the npm repo too early. I'll take a look this evening at the state of the code and see if I can get a nicely rolled version that will work from npm. Certainly deploy with this repo is straight forward - so I'd like that reflected in the npm install.

No problem. Thx for quick answer and great project ;-)

fpp commented Jul 27, 2012

similar issue when using - npm install jsbin - but server did not even start - coffeescript issue guess it could be related to the path created with the npm install
(npm installs everything under node_modules e.g. node_modules/jsbin/xxx)

did a git clone from master & now all seems to work

git clone https://github.com/remy/jsbin.git
cd jsbin
make
// make of course comes back with errors as I have no PHP on this machine
npm install
// edit config.default.json -> config.local.json
node .

@fpp Have you tried to castcode? With the edit/watch?

Owner

remy commented Jul 27, 2012

We're literally fixing all this right now - hold on to your socks!

fpp commented Jul 27, 2012

Yes - just tried - access to bin works but there are general issues with writing to SQLITE when saving the bins - not every write but merely every second write so a new bin is created then (instead of the old being saved)

Error: SQLITE_CONSTRAINT: constraint failed
followed by e.g.
POST /ekemus/3/save 500

will wait for Remy's update and then look into it further

BTW is generating a path like "ekemus" a feature or should the bins not be saved under /[user-id]/[bin-id]

Owner

remy commented Jul 27, 2012

Okay, this should be in npm now - we've updated the docs (but need to sort out the dev/master branch so it's a little more readable).

Bottom line:

npm install -g jsbin
jsbin

That's it.

It took a while to get there, but it works really well using node!

remy closed this Jul 27, 2012

This work really well. Thanks again.

Now I'll see how I can use that with my students during lessons :p

Owner

remy commented Aug 21, 2013

@hsablonniere I know it's been a year, but how did you get on with using jsbin with your students?

Hi Remy, Sadly I didn't had time to use it during the sessions.

I won't teach this year but I may have to do an angular training for my colleagues. If I try something I'll let you know ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment