Compare commits

...

2 Commits

Author SHA1 Message Date
Dbroqua f73e46b5e6 Added scripts for server deployment 2021-03-27 17:49:44 +01:00
Dbroqua 208dfacb29 Added missing modules 2021-03-27 17:48:49 +01:00
4 changed files with 817 additions and 554 deletions

18
carburants.service Normal file
View File

@ -0,0 +1,18 @@
[Unit]
Description=API Carburants!
After=network-online.target
[Service]
Environment="PORT=3666"
Type=simple
User=dbroqua
Group=dbroqua
UMask=007
WorkingDirectory=/home/dbroqua/carburants/api
ExecStart=yarn start
Restart=on-failure
TimeoutStopSec=300
[Install]
WantedBy=multi-user.target

16
cron.sh Executable file
View File

@ -0,0 +1,16 @@
#! /bin/bash
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
cd ${SCRIPTPATH}
mkdir ./public
cd ./public
wget https://donnees.roulez-eco.fr/opendata/jour
unzip jour
mv PrixCarburants_quotidien*.xml gas-stations.xml
rm jour
cd ../
node importGasStations.js

View File

@ -30,6 +30,7 @@
"ext": "*.js,*.json,*yaml"
},
"dependencies": {
"@babel/compat-data": "^7.13.12",
"cookie-parser": "~1.4.4",
"cors": "^2.8.5",
"debug": "~2.6.9",
@ -48,11 +49,11 @@
},
"devDependencies": {
"@babel/core": "^7.8.6",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.8.3",
"@babel/preset-env": "^7.8.6",
"@babel/register": "^7.8.6",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-object-rest-spread": "^7.13.8",
"@babel/plugin-transform-runtime": "^7.13.10",
"@babel/preset-env": "^7.13.12",
"@babel/register": "^7.13.8",
"babel-eslint": "^10.1.0",
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.0.0",

1326
yarn.lock

File diff suppressed because it is too large Load Diff