Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
[INCOMPLETE, not runnable] a JavaScript app server for learning JavaScript in the browser
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
client/sys
docs
server
user
.gitignore
LICENSE.mkd
README.mkd

README.mkd

Meg JavaScript App Server

Copyright © 2012 Brendan Kidwell

This application is not finished yet. It is hosted on Github so that I can have a convenient place to sync my files, and so that any interested parties might know I'm working on it. Feel free to play around with it but don't expect any particular usefulness yet.

Meg is an application server for JavaScript files that are to be executed in a web browser. I created Meg to provide a platform for students of any age to get started learning how to program computers with JavaScript. In order to keep things simple and not overwhelm new students, I try to make it easy to avoid learning HTML and CSS at the beginning, focusing on only JavaScript.

Available features:

  • An event-driven Console object (rendered as HTML in the browser) with methods for input and output, including support for color.

  • Clean root (window) namespace. Only one top-level object is created, and it's called MEG. Children of this object may be aliased into the running program. (Example: "var con = MEG.console;".)

To be implemented:

  • Textbook with instructions, problems, and some solutions.

  • File I/O backed by 5MB window.localStogae object in browser and/or backed by the app server (with permissions model and multiple accounts, to allow sharing). Plus, ability to export and import a set of the students' files for portability.

  • Low-level peer-to-peer chat provided by the app server (local, XMPP, and/or ZeroConf) to allow sending events from one instances of a program to another. Let's build some simple and hackable multi-player games!

  • JavaScript interface to create and bind methods to HTML widgets: menus, buttons, text boxes, etc.

  • In-browser file manager and source code editor ( http://codemirror.net/ ).

  • Procedural graphics? Sprite graphics? Sound?

Getting Started

  1. Install node.js (I'm using version 0.6.13 at this time).

  2. At the command line, run "node ./server/app.js".

  3. In your browser, go to http://localhost:3000/FILE.JS?run , where FILE.JS is a file in the ./user folder. The app server will serve an empty HTML page with the required client-side JavaScript libraries and then run window.main() .

Something went wrong with that request. Please try again.