Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added a quick-start guide and prereqs to the readme. also added bin/s…

…erver.js.
  • Loading branch information...
commit 80c2f3d26630caf2063cce123269f8132b02f7a1 1 parent 008aa65
@toolness authored
Showing with 50 additions and 0 deletions.
  1. +35 −0 README.md
  2. +15 −0 bin/server.js
View
35 README.md
@@ -3,6 +3,41 @@
This is a friendly HTML editor that uses [slowparse][] and [hacktionary][]
to provide ultra-friendly real-time help to novice webmakers.
+## Prerequisites
+
+Using Friendlycode doesn't actually require anything other than a
+static file server like Apache. However, if you want to generate optimized
+builds and run the test suites, you'll need node, npm, and phantomjs.
+
+## Quick Start
+
+```bash
+git clone --recursive git://github.com/toolness/friendlycode.git
+cd friendlycode
+git checkout i18n
+npm install
+npm test
+```
+
+To run a simple built-in static file server from the repository's
+root directory, run:
+
+```bash
+node bin/server.js
+```
+
+## Examples
+
+You can see a trivial embedding at:
+
+ http://localhost:8005/examples/bare.html
+
+By default, friendlycode doesn't allow JS. An example of an
+embedding that allows JS and publishes using an alternate API is
+here:
+
+ http://localhost:8005/examples/alternate-publisher.html
+
## Updating CodeMirror
In the `codemirror2` directory is a mini-distribution of [CodeMirror][]
View
15 bin/server.js
@@ -0,0 +1,15 @@
+#! /usr/local/bin/node
+
+var express = require('express'),
+ app = express.createServer(express.logger()),
+ port = 8005,
+ dirname = process.cwd();
+
+if (process.argv[2] && process.argv[2].match(/^[0-9]+$/))
+ port = parseInt(process.argv[2]);
+
+app.use(express.static(dirname));
+
+app.listen(port, function() {
+ console.log("serving on port " + port + " files in " + dirname);
+});
Please sign in to comment.
Something went wrong with that request. Please try again.