Permalink
Browse files

Kickstart app with something simple that 404's for all requests

  • Loading branch information...
1 parent 436fbee commit 29891417cac5f30ac910d248f2d8ad392aced449 @evdb evdb committed Dec 24, 2012
Showing with 727 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +661 −0 LICENSE.txt
  3. +12 −0 Makefile
  4. +15 −0 config/jshint-node.json
  5. +16 −0 index.js
  6. +22 −0 package.json
View
@@ -0,0 +1 @@
+node_modules
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,12 @@
+all: node-modules
+
+node-modules:
+ npm install
+ npm prune
+
+jshint:
+ node_modules/.bin/jshint --config config/jshint-node.json *.js
+
+test: jshint
+
+PHONY: node-modules test jshint
View
@@ -0,0 +1,15 @@
+{
+ "node": true,
+ "es5": true,
+
+ "camelcase": true,
+ "curly": true,
+ "indent": 2,
+ "newcap": true,
+ "quotmark": true,
+ "regexp": true,
+ "strict": true,
+ "trailing": true,
+ "undef": true,
+ "unused": true
+}
View
@@ -0,0 +1,16 @@
+"use strict";
+
+var express = require("express");
+
+module.exports = function () {
+
+ var app = express();
+
+ // 404 everything
+ app.all("*", function (req, res) {
+ res.status(404);
+ res.jsonp({ error: "404 - page not found" });
+ });
+
+ return app;
+};
View
@@ -0,0 +1,22 @@
+{
+ "name": "l2b-api",
+ "version": "0.0.0",
+ "description": "API for the LinkToBooks components",
+ "main": "index.js",
+ "scripts": {
+ "test": "make test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/LinkToBooks/l2b-api.git"
+ },
+ "dependencies": {
+ "express": ">= 3"
+ },
+ "devDependencies": {
+ "jshint": ">= 0.9.1"
+ },
+ "author": "",
+ "license": "AGPLv3",
+ "readmeFilename": "README.md"
+}

0 comments on commit 2989141

Please sign in to comment.