Trenode.js is a project I'm working on to give me and my friend an easy way to check italian trains schedule and real time train tracking through Trenitalia API.
This is my first Javascript/Node project so I'm sure there is a lot of spaghetti code.
Feel free to contribute!
Here is the website: Trenode.js
Search train solutions between two destinations at a certain date and timeTrenitalia broke the viaggiatreno APIs that were being usedChoosing a solution allows to check the trains status, including trains numbers, platforms and delaysTrenitalia broke the viaggiatreno APIs that were being used- Autocompleting date, time(to current ones) and station names in the form
- Fully responsive layout
- Mobile friendly
- Automatic dark mode
- Page to check timetable of stations for both arrivals and departures
- Push notifications for timetable updates
- Officially a web app! Now you can add it to your home screen and use it as a native app
- Added push notifications to the timetable page to get notified about train updates
- Fixed bug when Trenitalia provided solutions with some null values
- Added new page to check timetable of stations for both arrivals and departures
- Solutions with more than a train now render properly
- Status train's page now automatically refreshes every minute
- Almost completely code rewrite with promises (await and async too)
- Updated layout of all the pages, now fully HTML5 compliant
- Added dark mode
- Removed deprecated package for api requests. Now using Axios
- Cleaned up the code a bit
- Removed useless files from the repo (node_modules)
- Viaggiatreno APIs are not always reliable so train status might show the wrong train when checking the real time tracking (especially if checking a train that has not departed yet)
If you want to try it on your local machine, you just need to run some simple commands
- Either download the repo or clone it (git clone https://github.com/fratorgano/Trenode.js)
- Go to the folder you cloned it to
- Run the following commands
- npm install (Which install all the modules needed, it shouldn't fail but if it does, just run it again)
- npm start (Starts the server on localhost:8080)
- Node.js - Javascript runtime
- Express - Web Framework
- Express-Compression - Compression Middleware
- Express-Session - Session Middleware
- Body-Parser - Parsing Middleware
- EJS - Embedded JavaScript templates for Express
- Axios - Promise based HTTP client for node.js
- Bootstrap - Front-end Framework
- Autocomplete - Autocomplete form inputs
Trenode.js is released under the MIT License.