This application will allow the user to monitor the current price of fuel in Munster. It is also possible to see the dynamics of price changes over a certain period. Currently, the app uses the api, which provides data on fuel in Germany.
To get a local copy up and running follow these simple example steps.
Personally, I use npm as a package manager
- npm
npm install npm@latest -g
-
Clone the repo
git clone https://github.com/codeformuenster/fuelprices.git
-
Install NPM packages.
cd ./client npm install
cd ./server npm install
-
Copy .env file and create your local env file:
- for server folder, 'env.local'
- for client folder 'env.localenv'
-
Run projects locally:
- for server
cd ./server npm run local
- for client
cd ./client npm run local
- for server
The first start of the server will check whether the data is in the database and if not, execute the seed function. The seed function will write the data for the city of Munster to the cities
collection and the fuel stations for this city to the stations
collection.
It will also execute the first price fetch for these stations.
Note: The cron function that updates prices is not run for the local environment. If you want it to do so, please? go to cron.js
file and remove the following condition:
if (process.env.NODE_ENV !== 'local') {
cron.schedule('*/10 * * * *', fetchAndSavePrice);
}
- Create mobile app
See the open issues for a full list of proposed features (and known issues).
Distributed under the MIT License. See LICENSE.txt
for more information.
https://codeformuenster.org/#projekte
Project Link: https://github.com/codeformuenster/fuelprices