Skip to content

Latest commit

 

History

History
91 lines (69 loc) · 2.6 KB

README.md

File metadata and controls

91 lines (69 loc) · 2.6 KB

Shelved

This project has been shelved.

What is?

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.

Installation

To start, install:

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

Usage

Transpile & minify assets

npm run build

Watch for file changes

And then transpile & minify assets on filechange:

npm run watch

Run the server

npm start

And then open up localhost:3000 (or whatever port you've set it to).

Debugging the server

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 (!)