Skip to content

Commit

Permalink
Add node.js/Heroku server
Browse files Browse the repository at this point in the history
Fix Quixe error
  • Loading branch information
curiousdannii committed May 18, 2013
1 parent fa27316 commit a60cf3a
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 7 deletions.
1 change: 1 addition & 0 deletions Procfile
@@ -0,0 +1 @@
web: node tools/server.js
6 changes: 3 additions & 3 deletions lib/parchment.debug.js
Expand Up @@ -1206,7 +1206,7 @@ jQuery.ajaxPrefilter( 'script', function( options /*, originalOptions, jqXHR*/ )
});

// The home for Parchment to live in
var parchment = {
window.parchment = {

// The default parchment options
options: {
Expand Down Expand Up @@ -1238,10 +1238,10 @@ var parchment = {

// Classes etc
lib: {}
},
};

// Isolate the query string options we have
urloptions = (function( options ) {
var urloptions = (function( options ) {
var i = 0, result = {}, temp;
if ( options[0] == '' )
{
Expand Down
2 changes: 1 addition & 1 deletion lib/parchment.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -14,6 +14,9 @@
"bugs": {
"url": "https://code.google.com/p/parchment/issues/list"
},
"dependencies": {
"express": "~3.2.4"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-concat": "~0.2.0",
Expand Down
6 changes: 3 additions & 3 deletions src/parchment/intro.js
Expand Up @@ -37,7 +37,7 @@ jQuery.ajaxPrefilter( 'script', function( options /*, originalOptions, jqXHR*/ )
});

// The home for Parchment to live in
var parchment = {
window.parchment = {

// The default parchment options
options: {
Expand Down Expand Up @@ -69,10 +69,10 @@ var parchment = {

// Classes etc
lib: {}
},
};

// Isolate the query string options we have
urloptions = (function( options ) {
var urloptions = (function( options ) {
var i = 0, result = {}, temp;
if ( options[0] == '' )
{
Expand Down
18 changes: 18 additions & 0 deletions tools/server.js
@@ -0,0 +1,18 @@
/*
Parchment server
================
Copyright (c) 2013 The Parchment Contributors
BSD licenced
https://github.com/curiousdannii/parchment
*/

var express = require( 'express' );
var app = express();

app.use( express.compress() );
app.use( express.static( __dirname + '/../' ) );

app.listen( process.env.PORT || 3000 );

0 comments on commit a60cf3a

Please sign in to comment.