Skip to content

Lalit-Kumar20/Online-Railway-Ticket-Booking

Repository files navigation

Railway Commodity Reservation System

Instructions to Run:
Pre-requisites
Mongodb
Nodejs
StripeAccount

Download the zip file or clone it.
Connect to your local mongodb database inside app.js
Edit this line in app.js (mongoose.connect("mongodb://localhost:27017/railsDBS2",{useNewUrlParser : true,useUnifiedTopology : true});)
Open terminal, navigate to the folder.
Run the command npm install , it will install all the dependencies.
Create a .env file in the project folder and add variables ,(SECRET=YourSecret) for session,
ADMIN=YourAdminModeUserIdandPassword
Admin mode has same userid and password
PUBLISHABLEKEY=YourStripePublishableKey
SECRETKEY=YourStripeSecretKey
You can get your secret and publishable key for free by creating an account on stripe.com
Run the command nodemon app.js
Open any web browser and search localhost:3000

At the home page you will see two modes user mode, and the admin mode.
In the admin mode you first need to login with the right credentials and then you can insert,update and delete the railways database.
In the user mode, first you need to create a account.
Then after logging in you will see three options,
1: Book a ticket.
2: Cancel a ticket.
3: Your Tickets.

On clicking book a ticket you will be asked to enter the date , mobile no. ,source ,destination after that you will see all trains. After entering the no. of tickets you want to book and selecting the train you will be asked for payment , you can make a payment only through card. Please see Project Report for full details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published