This project has been shelved.
OpenSprites is the place where Scratchers can upload and download super-cool resources to use in their projects, with new stuff being added daily by users all over the globe.
To start, install:
- Node.js
- MongoDB (or use mLab)
- node-gyp
- node-canvas prerequisites
- Python 2.7 (if you have Python 3 installed already, you can install a portable version of python 2.7 and replace the
$PATH
entry) - sox with the mp3 format for sox (windows)
Then, in a Terminal or Command Prompt window:
git clone https://github.com/OpenSprites/OpenSprites-next.git opensprites-next
cd opensprites-next
npm install
If you get errors during install or the server ends up not working, you may need to rebuild native modules:
npm rebuild lwip
npm rebuild bcrypt
npm rebuild canvas
Lastly, setup a .env
file in this format, making sure to create the respective database and username/password:
# MongoDB credentials
db_host=localhost
db_name=next
db_user=username
db_pass=password
# Use database to store files?
# `false` to use local filesystem
db_file_storage=true
# project id (on Scratch) for sign up page
# (remove if you don't want to require an
# existing Scratch account to sign up)
project_id=115307769
session_secret=thisandagainplsexplain
server_port=3000
# where are you running the server?
hostname=opensprites.org
#sendgrid_api_key=SG.ABCxyz
npm run build
And then transpile & minify assets on filechange:
npm run watch
npm start
And then open up localhost:3000 (or whatever port you've set it to).
First install node-inspector
: npm install -g node-inspector
Then run in separate processes: npm run watch
, node-inspector
, and npm run start-debug
Then open Chrome (or a Chromium-based browser) to http://localhost:8080/?port=5858
- Sourcemaps partially work (open the
*.source
files) - Some breakpoints work (in particular they don't work on ES6 syntax, eg
let
) - REPL works (!)