Add process submodule and bash script

master
Ian Mancini 5 years ago
parent 0f0e4219e0
commit b2397117c2

3
.gitmodules vendored

@ -0,0 +1,3 @@
[submodule "process"]
path = process
url = https://git.trovadores.duckdns.org/ianmethyst/spy-camera-process.git

@ -41,11 +41,14 @@ app.post('/upload-photo', async (req, res) => {
};
// move photo to uploads directory
const filepath = `./uploads/${photo.name}`;
photo.mv(filepath);
const filepath = `uploads/${photo.name}`;
await photo.mv(`./${filepath}`);
const python = spawnSync('python3',
['./main.py', `${filepath}`, `${city}`, `${school}`, `${age}`]);
const python = spawnSync(
'bash',
['-e', './runProcess.sh', `../${filepath}`, `${city}`, `${school}`, `${age}`]);
console.log("stdout: ",python.stdout.toString('utf8'));
console.log("stderr: ",python.stderr.toString('utf8'));
if (python.status === 0) {
res.send({

@ -0,0 +1 @@
Subproject commit 12990cac8d50b44db953d7b375e43c039029b5e7

@ -0,0 +1,5 @@
#/bin/bash
cd process
pipenv run python3 main.py "$1" "$2" "$3" "$4"
exit 0
Loading…
Cancel
Save