Coder Social home page Coder Social logo

magar0 / booking-nodejs-expressjs Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 471 KB

AlmaBetter backend project booking movie app made using react ,nodejs, express js.

Home Page: https://booking-nodejs-expressjs-frontend-almabetter-63araifi1.vercel.app/

JavaScript 72.68% HTML 13.10% CSS 14.22%

booking-nodejs-expressjs's Introduction

Book My Show

Table of contents

General info

  • Developed a booking app where one can book movies and see their last booking details.
  • Created a submit button that on click makes a booking if all the required data(movie name, slot, least one ticket) is selected.
  • After the successful booking, all selection are cleared.
  • If booking successful, then the last booking is updated without making a new GET request.
  • Used localStorage to store temporary selection made by the user.

Technologies

  • MERN stack
  • React JS.
  • Mongo DB.
  • Node JS., Express JS.

Setup

  1. Set up environment variables:

    • Create a .env file in the src directory.

    • Add the following variables to the .env file, replacing the placeholder values with your actual credentials:

      MONGO_URI="your_MongoDb_uri"
      
    • Again Create a .env file in the src/client directory.

    • And again add:

      REACT_APP_URL="Your backend server url " (optional by default set to http://localhost:3000)
      
  2. Install dependencies and run server:

Frontend

 cd src/client
 npm install
 npm start

Backend

cd src/
npm install
npm start

API Endpoints

Endpoint Description Method Request Body Response Format (Example)
/api/booking last booking details GET None {movie:string, slot:string, seats:{A1?:number , A2?:number, A3?:number, A4?:number, D1?:number, D2?:number}}
And If no Booking exist:
{message: "no previous booking found" }
/api/booking Book seat POST {movie:string, slot:string, seats:{A1?:number , A2?:number, A3?:number, A4?:number, D1?:number, D2?:number}} {movie:string, slot:string, seats:{A1?:number , A2?:number, A3?:number, A4?:number, D1?:number, D2?:number}}

booking-nodejs-expressjs's People

Contributors

magar0 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.