/rank_storage

Primary LanguageTypeScript

Description

This project is a Nest.js server designed to manage leaderboard records for a Gachon Univeristy Roblox racing game.
It facilitates the storage of user information, records, phone numbers, and other related data in a relational database.

Installation

$ yarn install

Running the app

# development
$ yarn run start

# production mode
$ yarn build
$ yarn start:prod

Configuration App

server.env

there is prepared example.env file, you need to edit as server.env

requirements

node.js mysql-server

tested env

name version
ubuntu 22.04
node 18.17.1

Endpoints

GET /records

Description: Retrieves all records from the leaderboard. Response: An array of record objects.

GET /records/:id

Description: Retrieves a specific record by its ID. Parameters: id: The unique identifier of the record. Response: The record object corresponding to the provided ID.

POST /records

Description: Adds a new record to the leaderboard. Request Body: JSON object containing record information.

{
    "student_id":"202020200",
    "clear_time":"81.430",
    "name":"UserName",
    "department":"department",
    "phone":"010-1234-5678",
    "nickname":"playerId"
}

Response: The added record object.

DELETE /records/:id

Description: Deletes a record from the leaderboard by its ID. Parameters: id: The unique identifier of the record to be deleted. Response: A success message confirming the deletion.

DELETE /records

Description: Deletes all records from the leaderboard. Response: A success message confirming the deletion.

Update Url on Racing Game

  1. get place Id of MetaGachon_Univ, MetaGachon_Racing
  2. update Racing Map
    • update url: ServerScriptService/RacingManager file insertFunction.OnServerInvoke function
    • update placeId : StarterGUI/Timer/FinishFrame/SubmitManager file, gachon local variable
  3. update MetaGachon_Univ Map
    • update url : ServerScriptService/GameManager file, dbFetchFunction.OnserverInvoke function
    • update PlaceId : ServerScriptService.GameManager file, PlaceCode local variable