Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianMrn committed Dec 8, 2018
1 parent 80b1321 commit 041adbc
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"fs": "^0.0.1-security",
"http": "^0.0.0",
"node-webcam": "^0.4.6",
"path": "^0.12.7",
"pi-servo-blaster.js": "0.0.3",
"ws": "^6.1.2"
}
Expand Down
8 changes: 8 additions & 0 deletions webserver.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
const express = require('express');
const app = express();
const cors = require('cors');
const path = require('path')

const { left, right, shoot } = require("./kek");

app.use(cors());

app.use(express.static(path.join(__dirname, 'react/build')));

app.get('*', (req,res) =>{
res.sendFile(path.join(__dirname+'/react/build/index.html'));
});

app.get('/left', function (req, res) {

const response = left();
Expand Down
25 changes: 25 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ accepts@~1.3.5:
mime-types "~2.1.18"
negotiator "0.6.1"

aplay@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/aplay/-/aplay-1.2.0.tgz#43aaf91727e57a2ecbd961d08b0cad00ca7afde5"
integrity sha1-Q6r5Fyflei7L2WHQiwytAMp6/eU=

array-flatten@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
Expand Down Expand Up @@ -304,11 +309,24 @@ path-to-regexp@0.1.7:
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=

path@^0.12.7:
version "0.12.7"
resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f"
integrity sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=
dependencies:
process "^0.11.1"
util "^0.10.3"

pi-servo-blaster.js@0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/pi-servo-blaster.js/-/pi-servo-blaster.js-0.0.3.tgz#eb12253782ceef8df6eafa2ddd5ce0926aad7b4f"
integrity sha1-6xIlN4LO74326vot3Vzgkmqte08=

process@^0.11.1:
version "0.11.10"
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI=

proxy-addr@~2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93"
Expand Down Expand Up @@ -404,6 +422,13 @@ unpipe@1.0.0, unpipe@~1.0.0:
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=

util@^0.10.3:
version "0.10.4"
resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901"
integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==
dependencies:
inherits "2.0.3"

utils-merge@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
Expand Down

0 comments on commit 041adbc

Please sign in to comment.