Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 9 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
View
13 examples/haml-view/app.js
@@ -1,13 +0,0 @@
-var
- jsgi = require('jsgi'),
- bogart = require('../../lib/bogart')
-
-var app = bogart.app(function(show) {
- var viewEngine = bogart.viewEngine("haml");
-
- show('/', function(req) {
- return viewEngine.respond('index.haml', { layout: false });
- });
-});
-
-jsgi.start(app)
View
13 examples/haml-view/package.json
@@ -1,13 +0,0 @@
-{
- "name": "haml-example",
- "version": "1.0.0",
- "author": "Nathan Stott",
- "email": "nathan.stott@whiteboard-it.com",
- "main": "./app.js",
- "directories": { "lib": "./lib" },
- "dependencies": {
- "promised-io": "v0.2.1",
- "jsgi": "v0.2.2",
- "mustache": "0.3.1-dev"
- }
-}
View
2  examples/haml-view/views/index.haml
@@ -1,2 +0,0 @@
-%h1 Hello World
-%p This template is written using HAML
View
4 examples/task-list/app.js
@@ -48,10 +48,10 @@ router.post("/", function(req) {
return bogart.redirect("/");
});
-router.del("/:name", function(req, name) {
+router.del("/:name", function(req) {
console.log('deleting '+req.params.name);
console.log(tasks);
- delete tasks[name];
+ delete tasks[req.params.name];
return bogart.redirect("/");
});
View
8 lib/bogart.js
@@ -11,7 +11,7 @@ var
inherits = require('util').inherits,
EventEmitter = require('events').EventEmitter;
-exports.version = [0,3,40];
+exports.version = [0,3,43];
exports.q = Q;
@@ -157,9 +157,9 @@ App.prototype.start = function(port, host) {
if (Router.isRouter(descriptor.middleware)) {
descriptor.middleware.nextApp = app;
app = descriptor.middleware;
+ } else {
+ app = descriptor.middleware.apply(descriptor.middleware, descriptor.args.concat([ app ]));
}
-
- app = descriptor.middleware.apply(descriptor.middleware, descriptor.args.concat([ app ]));
});
}
@@ -241,7 +241,7 @@ exports.router = function(config, notFoundApp) {
return {
status: 404,
body: [body],
- headers: { 'Content-Length': body.length, 'Content-Type': 'text/html' }
+ headers: { 'Content-Length': Buffer.byteLength(body, 'utf-8'), 'Content-Type': 'text/html' }
};
},
router = new Router(config),
View
1  lib/mimetypes.js
@@ -98,6 +98,7 @@ exports.mimeTypes = {
".m3u" : "audio/x-mpegurl",
".m4v" : "video/mp4",
".man" : "text/troff",
+ ".manifest": "text/cache-manifest",
".mathml" : "application/mathml+xml",
".mbox" : "application/mbox",
".mdoc" : "text/troff",
View
2  package.json
@@ -1,7 +1,7 @@
{
"name": "bogart",
"description": "Fast JSGI web framework taking inspiration from Sinatra",
- "version": "0.3.40",
+ "version": "0.3.43",
"keywords": ["bogart", "framework", "sinatra", "REST"],
"author": "Nathan Stott <nrstott@gmail.com>",
"email": "nathan.stott@whiteboard-it.com",

No commit comments for this range

Something went wrong with that request. Please try again.