RailSathi is an API-based web application built with Express.js and Node.js that allows users to check PNR status and find trains between stations. It provides a convenient way for users to access essential railway information quickly and efficiently.
- Check PNR status: Users can input their PNR (Passenger Name Record) number to check the status of their train ticket.
- Find trains between stations: Users can search for trains between two specified stations, getting information about available trains, their timings, and more.
- Express.js: A minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
- Node.js: A JavaScript runtime built on Chrome's V8 JavaScript engine, used for building scalable network applications.
- Other libraries: This project may also use additional libraries for handling HTTP requests, parsing responses, etc.
To run RailSathi locally, follow these steps:
- Clone this repository to your local machine.
- Navigate to the project directory.
- Install dependencies by running
npm install
. - Start the server by running
npm start
. - Access the application at
http://localhost:PORT
(where PORT is the port number specified in the configuration or the default port).
RailSathi provides a simple API that can be accessed programmatically or through a web interface.
-
Check PNR Status
- Endpoint:
/pnr-status
- Method: POST
- Parameters:
pnr
: The PNR number to check the status.
- Response: JSON object containing the status of the PNR.
- Endpoint:
-
Find Trains Between Stations
- Endpoint:
/trains-between-stations
- Method: POST
- Parameters:
source
: The source station code.destination
: The destination station code.date
: (Optional) The date of travel.
- Response: JSON object containing information about trains between the specified stations.
- Endpoint:
Contributions are welcome! If you'd like to contribute to RailSathi, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/my-feature
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/my-feature
). - Create a new Pull Request.
This project is licensed under the MIT License.