Skip to content

Commit

Permalink
npm init, express hello world, docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
pierotofy committed Jul 4, 2016
1 parent d2b46a8 commit 9aa3461
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM opendronemap:latest
MAINTAINER Piero Toffanin

RUN apt-get update
RUN apt-get install -y nodejs
RUN mkdir /var/www
WORKDIR "/var/www"
RUN git clone https://github.com/pierotofy/node-OpenDroneMap
RUN npm install

CMD ["/usr/bin/nodejs", "/var/www/index.js"]
2 changes: 2 additions & 0 deletions boot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"use strict";

3 changes: 3 additions & 0 deletions examples/hello.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
var odm = require("../index");

odm.hello();
12 changes: 12 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"use strict";

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

app.get('/', (req, res) => {
res.send('Hello World!');
});

app.listen(3000, () => {
console.log('Example app listening on port 3000!');
});
25 changes: 25 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "node-opendronemap",
"version": "0.1.0",
"description": "Node.js API to access OpenDroneMap",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/pierotofy/node-OpenDroneMap.git"
},
"keywords": [
"opendronemap"
],
"author": "Piero Toffanin",
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/pierotofy/node-OpenDroneMap/issues"
},
"homepage": "https://github.com/pierotofy/node-OpenDroneMap#readme",
"dependencies": {
"express": "^4.14.0"
}
}
3 changes: 3 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
exports.hello = () => {
console.log("Hi");
}

0 comments on commit 9aa3461

Please sign in to comment.