Posts
Q&A
Axios์ posts/${id}์ ์ซ์๋ฅผ ๋ณด๋ด์ ์๋ฌ๊ฐ ๋ฐ์ํ๋๊ตฐ์
์ง์ฝ๋ฉ๋ ๋ต๊ธ๊ณผ ๊ฐ์ด ์์ ๋ ์ฝ๋๊ฐ ์ฌ๋ผ์ ์์ต๋๋ค๋ง,์ปค๋ฆฌํ๋ผ ์์๋ฅผ ๊ฑด๋๋ฐ์ง ์๊ณ ์ปค๋ฎค๋ํฐ์์ ๋ฐ๋ก ํ์ธํ์ค ๋ถ๋ค์ ์ํด์ ์์ ์ฝ๋ ๋จ๊น๋๋ค. ์ฐธ๊ณ ํ์๋ฉด ์ข๊ฒ ์ต๋๋ค. (์ฌ์ง)As-IsPostDetailView.vue ํ์ผ defineProps ์ type ์ ์ถ๊ฐ// ์๋ต import { useRouter } from 'vue-router'; import { getPostById, deletePost } from '@/api/posts'; import { ref } from 'vue'; const props = defineProps({ id: String, }); // ์๋ตTo-Be import { useRouter } from 'vue-router'; import { getPostById, deletePost } from '@/api/posts'; import { ref } from 'vue'; const props = defineProps({ id: [String, Number], }); git ์์ branch -> 10_component_separate ๋ก ๋ณ๊ฒฝํด์ ํ์ธ ๊ฐ๋ฅํฉ๋๋ค.https://github.com/gymcoding/vue3-posts/blob/10_component_separate/src/views/posts/PostDetailView.vue
- 2
- 2
- 431
Q&A
ํ๊ฒฝ๋ณ์ ์ค์ ์ Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string ๋ผ๋ ์๋ฌ๊ฐ ๋ฉ๋๋ค.
์ ๋ ๋์ผํ ์๋ฌ ๋ฉ์์ง๊ฐ ๋จ๊ธธ๋ ๋ค์๊ณผ ๊ฐ์ด ํด๊ฒฐ ํ์์ต๋๋ค.์ฐธ๊ณ ํ์๋ฉด ์ข๊ฒ ์ต๋๋ค.-> TypeOrmModule.forRoot ๋ณด๋ค ConfigModule.forRoot ๋ฅผ ์๋จ์ ์์นํ๋๋ก import ์์๋ฅผ ๋ณ๊ฒฝ.imports: [ ConfigModule.forRoot({ envFilePath: '.env', isGlobal: true, }), TypeOrmModule.forRoot({ type: 'postgres', host: process.env[ENV_DB_HOST_KEY], port: parseInt(process.env[ENV_DB_PORT_KEY]), username: process.env[ENV_DB_USERNAME_KEY], password: process.env[ENV_DB_PASSWORD_KEY], database: process.env[ENV_DB_DATABASE_KEY], entities: [PostsModel, UsersModel], synchronize: true, }), PostsModule, UsersModule, AuthModule, CommonModule, ],
- 0
- 2
- 1.3K