Coder Social home page Coder Social logo

p5js-sandbox's Introduction

Sandbox for creating p5.js sketches. Create sketches, save / load / edit / browse contributed sketches from others. App is running live here.

Install

First install the required node modules from the package.json file by running:

npm install

Or you can do each module manually...

npm install express
npm install socket.io
npm install mongodb

You then have to setup a mongodb database. Easiest way to do this is to use mongolab for node.js which creates a database on Amazon EC2 for you. The following instructions are for doing that, or you can setup mongodb on your own machine and run it locally only.

Deploy the app to heroku and then add a mongolab db by running:

heroku create
heroku addons:create mongolab

Then run the following command to the get the URI of your new mongodb instance.

heroku config | grep MONGOLAB_URI

// you should see something like this:
->MONGOLAB_URI => mongodb://heroku_app1234:[email protected]:29017/heroku_app1234

Copy the address given to you in the previous step, then go to the file server.js, and replace the following line with the address above.

var uri = 'mongodb:....'

Push all the changes to heroku

git add *
git commit -m "initial commit"
git push heroku master

Then deploy and run!

heroku ps:scale web=1
heroku open

Running locally

The app can also be run locally.

node server.js

Bugs/to-do

  • Saving takes too long (5-10 sec), mostly from generating the thumbnail, and doesn't finish if it's interrupted by user clicking another link
  • Sketch versioning trees (possibly hosted as github gists)
  • Users/collections/classrooms

p5js-sandbox's People

Contributors

genekogan avatar therewasaguy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.