Skip to content

Kampus-Merdeka-Software-Engineering/BE-2-Medan-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo-RevoU   WanToGo - Travel Agency Website   Logo-Kampus-Merdeka

GitHub contributors GitHub last commit GitHub issues GitHub pull requests GitHub repo size


made with markdown badge

WanToGo

Table of Contents 📑

Introduction

Welcome to the WanToGo server-side repository! WanToGo is an online learning media platform dedicated to enhancing the skills and knowledge of users in various fields of education. We are part of Group 2 Section Medan RevoU MSIB KM AUG23, and we are proud to have designed and built this platform to provide travel book services to users.

Technologies Used 🚀

WanToGo is built using various technologies, as follows:

Technology Description
HTML5 Used to create the basic structure of the website.
CSS3 Responsible for the appearance and style of the website.
JavaScript Adds interactivity to the website.
NodeJS Runs the server side of the project.
Express.js Node.js framework used for rapid web development.
FastAPI Allows integration of various data APIs to provide quality content to users.
Postman Performs Testing on the API and monitors performance

Requirements 📋

This project requires the following:

And the following Node.js packages:

Installation 🛠️

This project requires Node.js and npm (which comes with Node.js) to be installed on your machine.

Follow these steps to get the project set up:

  1. Clone the repository to your local machine. This can be done by running the following command in your terminal:
git clone <repository-url>
  1. Navigate to the project directory. This can be done by running the following command in your terminal:
cd <project-directory>
  1. Install the required packages. This project requires several Node.js packages, including express, cors, and dotenv. You can install all of them at once by running the following command in your terminal:
npm install

Usage 🖲️

Once you've installed the project, you can start using it:

  1. Start the server. You can do this by running the npm start command:
npm start

This will start the server and log a message to the console indicating the URL where the server is running

  1. Set the server port. The server will start on the port specified in your .env file. If you haven't created this file yet, you'll need to do so in the project directory. The file should contain a line like this:
PORT=<your-port-number>
  1. Use the /book-ticket endpoint to book a ticket. You can do this by sending a POST request to http://localhost:<your-port-number>/book-ticket.

  2. Use the /check-ticket endpoint to check a ticket. You can do this by sending a GET request to http://localhost:/check-ticket/.

Code Explanation 📚

  1. Import Dependencies: The code starts by importing the necessary dependencies. These include express for building the server, cors for handling Cross-Origin Resource Sharing, and dotenv for managing environment variables.
const express = require("express");
const cors = require("cors");
require("dotenv").config();
  1. Setting up the Server: An Express application is created and the port number is retrieved from the environment variables.
const app = express();
const PORT = process.env.PORT;
  1. Middleware: The express.json() middleware is used to parse incoming requests with JSON payloads and the cors() middleware is used to enable CORS.
app.use(express.json());
app.use(cors());
  1. Import Routes: After setting up the middleware, the routes for booking and checking tickets are imported.
const bookTicketRoute = require("./src/routes/bookTicketRoute");
const checkTicketRoute = require("./src/routes/checkTicketRoute");
  1. Use Routes: The imported routes are then used with the appropriate endpoints.
app.use("/book-ticket", bookTicketRoute);
app.use("/check-ticket", checkTicketRoute);
  1. Start the Server: The server is started by calling the app.listen() method. The port number is passed as an argument to the method, and a callback function is passed as a second argument. The callback function logs a message to the console indicating the URL where the server is running.
app.listen(PORT, () => {
  console.log(`Server is running on http://localhost:${PORT}`);
});

The server uses two routes: /book-ticket and /check-ticket. The code for these routes is imported from the src/routes directory.

The server starts by calling app.listen(), and logs a message to the console indicating the URL where the server is running.

Link to WanToGo Final Project 👩‍💻

Below is the link to the final project:

Website Link Description
WanToGo Go to Website Main WanToGo website link.

Team 2 Section Medan 💡

WanToGo is a project built with concentration and great hope by Group 2 Section Medan KM AUG23, MSIB ( RevoU x MSIB Kemendikbudristek ).
Here are the designers and developers of WanToGo:

Name Role
Stefanus Bernard Melkisedek Project Leader
Fajrina Reski Arini Frontend Engineer
Sherina Salsabila Dewi Beutari Frontend Engineer
Muhammad Ruskin Ridho Backend Engineer
Stefanus Bernard Melkisedek Backend Engineer
Rivianty Putri N Quality Assurance
Fadlila Nurwanda Quality Assurance

Contributing 🤝

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

Show your support 💪

Give a ⭐️ if you like this project!

Acknowledgments 🙏

We want to express our deepest appreciation to our instructors and mentor who have lectured and guided us to succeed in our project.

Our Instructors:

  1. Mustofa Ghaleb Amami
  2. Rafly Lesmana
  3. Aji Lantang Mardika

Our Mentor:

Ari Yuhendra

We also want to give a hat tip to anyone whose code was used as inspiration for this project.

End 👋

Thank you for visiting the WanToGo repository and having fun using it. We hope you enjoy using WanToGo as much as we enjoy building it.

"May this project inspire and benefit you. Let's keep coding together!"

About

BE-2-section-medan-group-2 created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published