Skip to content

NodeJs-MonogDB API single page application for booking flight seats.

Notifications You must be signed in to change notification settings

raniaSayed/Basic-Flights-Reservation-App-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Flight Reservation API

NodeJs-MonogDB API single page application for booking flight seats.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites (Used Technologies)

Node.js v8.10.0 or above

MongoDB database engine v3.6.3

Installation

To run App on Ububtu:

follow this commands

$ sudo service mongod start

$ cd {project_folder}/

$ npm install

$ npm start

$ mongo

Execute this script on mongo shell

Add inital seats to system with this script

use fligth_reservation313; 

let  seats = []; 

let chars = ["A","B","C","D","E","F"]; 

for(var i = 1 ;i < 11 ;i++){ 

  for(var j = 0 ;j < 6 ;j++){ 

    seats.push({_id:(i+chars[j]),available:true}); 
   }
} 
db.seats.insert(seats) 

start app via https://localhost:9090/

To run App on Windows

Start mongoDB server :

mongod.exe --config="C:\mongodb\mongo.config"

Connect to localhost MongoDB server via command line

mongo --port 27017

open project directory

open cmd and type this commands

$ npm install

$ npm start

$ mongo

Execute this script on mongo shell

Add inital seats to system with this script

use fligth_reservation313; 

let  seats = []; 

let chars = ["A","B","C","D","E","F"]; 

for(var i = 1 ;i < 11 ;i++){ 

  for(var j = 0 ;j < 6 ;j++){ 

    seats.push({_id:(i+chars[j]),available:true}); 
   }
} 
db.seats.insert(seats) 

start app via https://localhost:9090/

Author

Rania Sayed

About

NodeJs-MonogDB API single page application for booking flight seats.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published