kopia lustrzana https://github.com/OpenDroneMap/NodeODM
npm init, express hello world, docker file
rodzic
d2b46a8f00
commit
9aa34619ff
|
@ -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"]
|
|
@ -0,0 +1,2 @@
|
|||
"use strict";
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
var odm = require("../index");
|
||||
|
||||
odm.hello();
|
|
@ -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!');
|
||||
});
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
exports.hello = () => {
|
||||
console.log("Hi");
|
||||
}
|
Ładowanie…
Reference in New Issue