Browse Source

initial commit

pull/2/head
Peter Johnson 10 years ago
commit
b9db328ab6
  1. 1
      .gitignore
  2. 13
      controller/index.js
  3. 5
      express.js
  4. 7
      index.js
  5. 33
      package.json

1
.gitignore vendored

@ -0,0 +1 @@
node_modules

13
controller/index.js

@ -0,0 +1,13 @@
var pkg = require('../package');
function controller( req, res ){
res.json({
name: pkg.name,
version: {
number: pkg.version
}
});
}
module.exports = controller;

5
express.js

@ -0,0 +1,5 @@
var express = require('express');
var app = express();
module.exports = app;

7
index.js

@ -0,0 +1,7 @@
var app = require('./express');
// api root
app.get( '/', require('./controller/index' ) );
app.listen( process.env.PORT || 3100 );

33
package.json

@ -0,0 +1,33 @@
{
"name": "pelias-api",
"author": "mapzen",
"version": "0.0.0",
"description": "Pelias API",
"homepage": "https://github.com/pelias/api",
"license": "MIT",
"main": "index.js",
"scripts": {
"start": "node index.js",
"test": "echo \"Error: no test specified\" && exit 0"
},
"repository": {
"type": "git",
"url": "git://github.com/pelias/api.git"
},
"keywords": [
"pelias",
"elasticsearch",
"webview"
],
"bugs": {
"url": "https://github.com/pelias/api/issues"
},
"engines": {
"node": ">=0.10.26",
"npm": ">=1.4.3",
"elasticsearch": ">=1.2.1"
},
"dependencies": {
"express": "^4.8.8"
}
}
Loading…
Cancel
Save