Skip to content

Commit

Permalink
[CHORE] run script 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
unanchoi committed Jan 11, 2024
1 parent ce88524 commit dc5c7ed
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
38 changes: 38 additions & 0 deletions script/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

kill_process_on_port() {
local PORT=$1
local PID=$(lsof -t -i :$PORT)

if [ -n "$PID" ]; then
echo "Killing process on port $PORT with PID $PID"
kill -9 $PID
else
echo "No process is listening on port $PORT"
fi
}

if [ $# -ne 2 ]; then
echo "Usage: $0 <environment> <port>"
exit 1
fi

ENV=$1
PORT=$2

./gradlew clean build -x test

if [ $? -ne 0 ]; then
echo "Gradle build failed!"
exit 2
fi

kill_process_on_port $PORT

JAR_NAME="startlionserver-0.0.1-SNAPSHOT.jar"

cd build/libs

nohup java -Dspring.profiles.active=${ENV} -jar $JAR_NAME &

echo "Server started with profile: ${ENV} on port ${PORT}"
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
package com.startlion.startlionserver.dto.response.question;

import com.startlion.startlionserver.domain.entity.CommonQuestion;
import io.swagger.v3.oas.annotations.media.Schema;


@Schema(description = "공통 질문 응답 데이터")
public record CommonQuestionResponse(

@Schema(description = "공통 질문 ID")
Long commonQuestionId,

@Schema(description = "기수")
Long generation,

@Schema(description = "공통질문 1번")
String commonQuestion1,
String commonQuestion2,
String commonQuestion3,
Expand Down

0 comments on commit dc5c7ed

Please sign in to comment.