Skip to content

Commit

Permalink
Switched to webserver for Heroku deployment, updated docs. v1.0.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
derekwlms committed Mar 5, 2016
1 parent c36627b commit 6daf256
Show file tree
Hide file tree
Showing 9 changed files with 143 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
// Run 'grunt' for building and 'grunt serve' for preview.
// Use 'grunt test' to run the unit tests with karma.
// Use 'grunt docs' to generate doc. Then, run 'node docserver.js' and open in a browser (https://localhost:3000/docs).
// Use 'grunt docs' to generate doc. Then, run 'node webserver.js' and open in a browser (https://localhost/docs).

'use strict';

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ You can run Jiffy locally or use our [online version](https://jiffy.paymenthorizo

## Running Locally

Pre-requisites: [git](https://git-scm.com/) and [node.js](https://nodejs.org) ([details](https://github.com/derekwlms/jiffy/wiki/Installation)).
1. Get the code:
* `git clone https://github.com/derekwlms/jiffy.git`
* Or, `npm install jiffy-editor`
Expand All @@ -36,7 +37,7 @@ Use `grunt` to run jshint, tests, and the distribution build. Use `grunt test`

See the [wiki](https://github.com/derekwlms/jiffy/wiki) and [ngdocs](https://paymenthorizons.com/jiffyfiles/docs).

Use `grunt docs` to update the ngdocs. Then, run `node docserver.js` and [open in a browser](https://localhost:3000/docs).
Use `grunt docs` to update the ngdocs. Then, run `node webserver.js` and [open in a browser](https://localhost/app).

## License
Jiffy is released under the [ISC License](https://opensource.org/licenses/ISC). See LICENSE.txt.
Expand Down
90 changes: 90 additions & 0 deletions app/styles/markdown10.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
*{margin:0;padding:0;}
body {
font:13.34px helvetica,arial,freesans,clean,sans-serif;
color:black;
line-height:1.4em;
background-color: #F8F8F8;
padding: 0.7em;
}
p {
margin:1em 0;
line-height:1.5em;
}
table {
font-size:inherit;
font:100%;
margin:1em;
}
table th{border-bottom:1px solid #bbb;padding:.2em 1em;}
table td{border-bottom:1px solid #ddd;padding:.2em 1em;}
input[type=text],input[type=password],input[type=image],textarea{font:99% helvetica,arial,freesans,sans-serif;}
select,option{padding:0 .25em;}
optgroup{margin-top:.5em;}
pre,code{font:12px Menlo, Monaco, "DejaVu Sans Mono", "Bitstream Vera Sans Mono",monospace;}
pre {
margin:1em 0;
font-size:12px;
background-color:#eee;
border:1px solid #ddd;
padding:5px;
line-height:1.5em;
color:#444;
overflow:auto;
-webkit-box-shadow:rgba(0,0,0,0.07) 0 1px 2px inset;
-webkit-border-radius:3px;
-moz-border-radius:3px;border-radius:3px;
}
pre code {
padding:0;
font-size:12px;
background-color:#eee;
border:none;
}
code {
font-size:12px;
background-color:#f8f8ff;
color:#444;
padding:0 .2em;
border:1px solid #dedede;
}
img{border:0;max-width:100%;}
abbr{border-bottom:none;}
a{color:#4183c4;text-decoration:none;}
a:hover{text-decoration:underline;}
a code,a:link code,a:visited code{color:#4183c4;}
h2,h3{margin:1em 0;}
h1,h2,h3,h4,h5,h6{border:0;}
h1{font-size:170%;border-top:4px solid #aaa;padding-top:.5em;margin-top:1.5em;}
h1:first-child{margin-top:0;padding-top:.25em;border-top:none;}
h2{font-size:150%;margin-top:1.5em;border-top:4px solid #e0e0e0;padding-top:.5em;}
h3{margin-top:1em;}
hr{border:1px solid #ddd;}
ul{margin:1em 0 1em 2em;}
ol{margin:1em 0 1em 2em;}
ul li,ol li{margin-top:.5em;margin-bottom:.5em;}
ul ul,ul ol,ol ol,ol ul{margin-top:0;margin-bottom:0;}
blockquote{margin:1em 0;border-left:5px solid #ddd;padding-left:.6em;color:#555;}
dt{font-weight:bold;margin-left:1em;}
dd{margin-left:2em;margin-bottom:1em;}
sup {
font-size: 0.83em;
vertical-align: super;
line-height: 0;
}
* {
-webkit-print-color-adjust: exact;
}
@media screen and (min-width: 914px) {
body {
width: 854px;
margin:0 auto;
}
}
@media print {
table, pre {
page-break-inside: avoid;
}
pre {
word-wrap: break-word;
}
}
2 changes: 1 addition & 1 deletion app/views/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</button>

<a class="navbar-brand logo-image"
title="Jiffy - JavaScript File Editor&#013;&#013;v1.0.0 - 27 February 2016"
title="Jiffy - JavaScript File Editor&#013;&#013;v1.0.1 - 5 March 2016"
href="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/derekwlms/jiffy">
<img src="images/jiffy-small.png" alt="Jiffy">
</a>
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jiffy",
"version": "1.0.0",
"version": "1.0.1",
"description": "Jiffy - JavaScript File Editor",
"keywords": [ "file", "editor", "flat", "csv", "fixed", "nacha", "ach" ],
"license": "ISC",
Expand Down
12 changes: 0 additions & 12 deletions docserver.js

This file was deleted.

25 changes: 25 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Jiffy</title>
<link rel="stylesheet" href="/app/styles/markdown10.css">
<link rel="icon" href="/app/favicon.ico" type="image/x-icon" />
</head>
<body>
<h1>Jiffy - The JavaScript File Editor</h1>

<p> </p>
<img src="https://paymenthorizons.com/jiffyfiles/jiffy-med.png">

<p>Jiffy is a flat file editor written in JavaScript. It's a quick, easy way to view and edit your data files using only a browser. </p>

<p>For more information, and to get started, visit:</p>

<ul>
<li><a href="./app">Jiffy - local</a></li>
<li><a href="./docs">NgDocs - local</a></li>
<li><a href="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/derekwlms/jiffy">Jiffy on GitHub</a></li>
</ul>
</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jiffy-editor",
"version": "1.0.0",
"version": "1.0.1",
"description": "Jiffy - JavaScript File Editor",
"keywords": [ "file", "editor", "flat", "csv", "fixed", "nacha", "ach" ],
"license": "ISC",
Expand Down
22 changes: 22 additions & 0 deletions webserver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Serve up app and ngdocs pages for proper display in a web browser.
* Run under node.js: node webserver.js.
* https://localhost
*/

var express = require('express');
var serveStatic = require('serve-static');

var path = __dirname + '/';
var port = process.env.PORT || 80;
var suffix = port === 80 ? '' : ':' + port;

var app = express();
app.use('/', serveStatic(path + '/'));
app.use('/app/bower_components/', serveStatic(path + '/bower_components/'));

console.log('Serving files from ', path);
console.log('Web server started. Visit https://localhost'
+ suffix + ' or https://localhost' + suffix + '/app');

app.listen(port);

0 comments on commit 6daf256

Please sign in to comment.