Coder Social home page Coder Social logo

harshbalwanix / airticketbookingservice Goto Github PK

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

Booking Service Express API is a robust server built with Express and Sequelize for managing flight bookings, featuring a message queue system for seamless event handling. Easily deploy and customize to streamline your booking service operations.

JavaScript 100.00%
express js json nodejs rabbitmq sequelize-orm

airticketbookingservice's Introduction

Booking Service Express API

This repository contains an Express API server for a booking service, featuring Sequelize ORM integration. The project is structured with various components such as controllers, repositories, services, and a message queue system.

Server Setup

  1. Clone the Repository:

    git clone https://github.com/your-username/booking-service-express-api.git
    cd booking-service-express-api
  2. Install Dependencies:

    npm install
  3. Configure Settings: Adjust server and database configurations in config/server-config.js to fit your requirements.

  4. Run the Server:

npm start

Tech Stack:

  1. Express.js : Fast, unopinionated, minimalist web framework for Node.js.
  2. Sequelize: A promise-based Node.js ORM for PostgreSQL, MySQL, MariaDB, SQLite, and Microsoft SQL Server.
  3. RabbitMQ: Message broker for handling asynchronous communication between microservices.
  4. Body-parser: Middleware to parse incoming request bodies in a readable format.
  5. Axios: HTTP client for making requests to external services.
  6. dotenv: Module for loading environment variables from a .env file.
  7. http-proxy-middleware: Express middleware for proxying requests.
  8. morgan: HTTP request logger middleware.
  9. Express Rate Limit: Middleware for limiting repeated requests to public APIs or routes.

Components

index.js Express server setup and initialization, including middleware, routes, and server start logic.

messagequeue.js Utility module for handling RabbitMQ message queue interactions, supporting message publishing and subscription.

serverconfig.js Configuration file for server settings, such as port, message broker URL, exchange name, and binding key.

booking-controller.js Express controller handling booking-related HTTP requests, including the creation of bookings and message queue event publishing.

booking.js Sequelize model for the BOOKING entity, defining the structure and associations of booking data.

booking-repo.js Repository handling database operations for the BOOKING entity, including creation and status updates.

booking-service.js Service module orchestrating the booking creation process, involving interactions with the Flight Service and handling errors.

Quick Start for Each Component

Navigate to each component's respective file and follow the instructions provided in the comments to set up and run.

Feel free to customize and extend this project to meet your specific booking service requirements.

Note: Ensure that you have RabbitMQ installed and configured if you intend to use the message queue functionality.

airticketbookingservice's People

Contributors

harshbalwanix 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.