Compare commits
2 commits
fbf2a55cb1
...
f73e46b5e6
Author | SHA1 | Date | |
---|---|---|---|
|
f73e46b5e6 | ||
|
208dfacb29 |
4 changed files with 817 additions and 554 deletions
18
carburants.service
Normal file
18
carburants.service
Normal 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
16
cron.sh
Executable 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
|
||||||
|
|
11
package.json
11
package.json
|
@ -30,6 +30,7 @@
|
||||||
"ext": "*.js,*.json,*yaml"
|
"ext": "*.js,*.json,*yaml"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@babel/compat-data": "^7.13.12",
|
||||||
"cookie-parser": "~1.4.4",
|
"cookie-parser": "~1.4.4",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"debug": "~2.6.9",
|
"debug": "~2.6.9",
|
||||||
|
@ -48,11 +49,11 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.8.6",
|
"@babel/core": "^7.8.6",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.8.3",
|
"@babel/plugin-proposal-class-properties": "^7.13.0",
|
||||||
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
|
"@babel/plugin-proposal-object-rest-spread": "^7.13.8",
|
||||||
"@babel/plugin-transform-runtime": "^7.8.3",
|
"@babel/plugin-transform-runtime": "^7.13.10",
|
||||||
"@babel/preset-env": "^7.8.6",
|
"@babel/preset-env": "^7.13.12",
|
||||||
"@babel/register": "^7.8.6",
|
"@babel/register": "^7.13.8",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
"eslint-config-airbnb-base": "^14.0.0",
|
"eslint-config-airbnb-base": "^14.0.0",
|
||||||
|
|
Loading…
Reference in a new issue