Skip to content

Commit

Permalink
fix: dist 폴더 path 변경사항 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
ww8007 committed Jul 7, 2024
1 parent 895fc5b commit 5d43007
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/todo/todo.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ import { TodoData } from './interface/todoData';

@Injectable()
export class TodoService {
private readonly filePath = join(process.cwd(), 'src/data/todos.json');
private readonly filePath = join(
process.cwd(),
process.env.NODE_ENV === 'production' ? 'app' : 'dist',
'data',
'todos.json',
);

private readTodos(): TodoData {
try {
Expand Down

0 comments on commit 5d43007

Please sign in to comment.